DEV Community

Discussion on: How to use git efficiently

Collapse
 
rbukovansky profile image
Richard Bukovansky

Sorry, but this "It is the responsibility of the reviewer to resolve these code conflicts and merge the code. In this case, you as the tech lead need to resolve these code conflicts and merge the code." is fundamentally wrong and that's not how Pull Requests work.

Before any Pull Request can be merged it has to have resolved any conflict with code in target branch (I believe GitHub wouldn't allow merge before the conflicts are resolved). And that is PR author's, no matter if begginer or senior, responsibility. This has been workflow for Linus, for GitHub and its clones, actually everybody for years.

Collapse
 
adityasridhar profile image
Aditya Sridhar

What you are saying is absolutely right for open source projects :)

But in enterprise projects, in case the developer is a beginner , it is better if the tech lead resolves the conflicts. Over time with experience the developer would learn how to resolve conflicts.

I guess i haven't mentioned that clearly in the post. Thanks for pointing out. Will make that more clear in the article

Collapse
 
rbukovansky profile image
Richard Bukovansky

What I have written is valid for both, open-source or enterprise...

If you developer is a beginner, he can ask somebody to help him with resolving of conflict which is anyway on his branch, not on develop branch. If the TechLead will always resolve those conflicts, those kids will never learn how to do that and would always dump that conflict on Tech Lead. Bad idea...

Thread Thread
 
adityasridhar profile image
Aditya Sridhar

That is a valid point :)

Maybe the right way of putting it in the article would be "The Tech lead can resolve the conflicts in case the deadlines are tight. But best practise is to ensure beginner devs take the help of someone to resolve conflicts so that they learn the process as well"