In Bazaar if you have a conflict in foo.html it will make an additional 3 files
foo.html.BASE
foo.html.OTHER
foo.html.THIS
Then you can
diff -Naur foo.html.BASE foo.html.OTHER
Comparing the common basis with the other set of changes is really helpful because it tells you what, exactly, they changed, which helps answer why they did it. For example, if all they changed was white space, you can confidently use your own change.
How do I accomplish this in git?
gitdoesn’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 (togittools – the files don’t actually exist, so, e.g. normaldiffwon’t see them). So, for example, you can rungit diff :1:foo.html :2:foo.htmlto see the differences betweenBASEandTHIS. Stage 3 would be yourOTHERversion. You could also usegit mergetool foo.htmlorgit difftool foo.html. If you really need to use a non-gittool on them, you can do this: