git
doesn't store the actual full-copy versions of the three files in your working directory. Instead, it stores a single file that has conflict markers placed in it. However, you can still get at those versions using the :<stage>:<filename>
syntax (to git
tools - the files don't actually exist, so, e.g. normal diff
won't see them). So, for example, you can run git diff :1:foo.html :2:foo.html
to see the differences between BASE
and THIS
. Stage 3 would be your OTHER
version. You could also use git mergetool foo.html
or git difftool foo.html
. If you really need to use a non-git
tool on them, you can do this:
git show :1:foo.html > foo.html.BASE
git show :2:foo.html > foo.html.THIS
git show :3:foo.html > foo.html.OTHER
diff ......