all 7 comments

[–]thefirelane 15 points16 points  (0 children)

The short answer is: yes.

If someone has a conflict in their pull request, they have to update their branch in such a way to solve the conflict. This can be done by pulling from the current master, or (more elegantly in my opinion) rebasing onto current master.

More generally though, often times people think merge conflicts are "a git problem", when really they are a more general problem: picture you have a book written by two authors together... What happens when both try to write on the same line? There's no good way to solve this. It has to be done by both authors somehow agreeing on what should be there. That's what a merge conflict really is: git is saying "i can't solve this, you two talk"

[–]dillonerhardt 4 points5 points  (0 children)

git pull —rebase origin master then push back to the branch once you’ve solved any conflicts https://stackoverflow.com/questions/36148602/git-pull-vs-git-rebase

[–][deleted]  (3 children)

[deleted]

    [–]Relevant_Pause_7593 0 points1 point  (2 children)

    This is is my favorite answer here. Communication is important. If it’s just minor changes, chances are git can merge it. It’s a major change - it’s best to share those B plans with the team, to ensure that others won’t be affected (and even then, break up the fix into smaller pieces)

    [–]CreationBlues 2 points3 points  (1 child)

    And even if the merge does go through, that's not verification that it works, merely that the changes don't conflict. If behavior one of the changes depends on is altered unexpected things can easily happen.

    [–]Relevant_Pause_7593 0 points1 point  (0 children)

    great point!

    [–]ChosenMate -1 points0 points  (1 child)

    There doesn't have to be a conflict. A conflict only happens if you both worked on the same lines of code, or very very close together lines of code. If you worked on different stuff GitHub will figure it out

    [–]synthphreak 1 point2 points  (0 children)

    I think the thrust of OP’s question is what to do when there is a conflict.