When there’s a collison during git merge, I open a mergetool called Meld. It opens three files LOCAL, BASE and REMOTE. As I’ve read LOCAL is my local branch, BASE is common ancestor and REMOTE is the branch to be merged.
Now to my question: which version of the file will be finally used? Is it REMOTE? If so, can I edit it as I want, regardless what’s in the BASE branch for example?
It’s the one in the middle :
BASE.In fact,
BASEis not the common ancestor, but the half-finished merge where conflicts are marked with>>>>and<<<<.You can see the file names on the top of meld editing window.
See the screenshot here
You can edit the
BASEfile as you want with or without using meld commands.You can also get rid of meld and just edit the file with your favorite text editor.
<<<< HEADand=====markers is the one of your local file before the merge.====and>>>> <branch name>is the one of the remote file.