The blog post "Five advanced Git merge techniques" does give even more details on the diff3 setting:
Turn diff3 conflicts using git config --global merge.conflictstyle diff3
.
The diff3 conflict style adds an extra section between the new |||||||
marker and =======
markers, which indicates:
- the original contents of the section,
- with your changes above and
- their (the branch that is being merged in's) changes below.
Even without a diff tool, the command git show
can help:
When you are inside a merge, you can use a special :N:
syntax, where N
is a number, to automatically select one of the merge parents.
1
selects the common base commit (the lower revision),
2
selects your version ("mine
"), and
3
selects their version (the higher revision).
So git show :3:foobar.txt
shows the upstream version of foobar.txt
.