Published: January 20, 2018
by Tobias Pleyer
Tags: git

Diverged branches

The whole idea of git is to allow people to cooperate. People work on their local copies of a branch on the server(s) and regularly push their work upstream. A quite common scenario is the case when someone pushes changes to a branch that pose conflicts with the changes of somebody else. In such a case it is “first wins” and the second guy has to take care to bring the all present version into a congruent state. One way is

And solving the merge conflicts that will result from these commands.

I personally prefer to pretend that all of my commits happened perfectly after the commits of the guy that was faster, so I choose to rebase my branch

The net results should be identical but the history graph will look much nicer.