A Small Matter of Programming: Painless Merge Conflict Resolution in Git:
To find the changes that went into each branch, we need to know what the merge base (state A) looks like. The most basic mechanism by which git allows us to do so is to set the merge.conflictstyle option to diff3 by executing the command:

$ git config merge.conflictstyle diff3

This setting gives you a third chunk in each conflict during a merge that shows the contents of the original from which the two current files you're merging originated.  Below image is from "A Small Matter of Programming".  Traditional conflict files have B & C.  The new content is from A.



<<<<<<< HEAD
roses are #ff0000
violets are #0000ff
all my base
are belong to you
|||||||
roses are red
violets are blue
all my base
are belong to you
=======
Roses are red,
Violets are blue,
All of my base
Are belong to you.
>>>>>>> master

Labels: ,