Git performs a three-way merge, finding the common ancestor (aka “merge base”) of the two branches you are merging. When you invoke git mergetool
on a conflict, it will produce these files suitable for feeding into a typical 3-way merge tool. Thus:
foo.LOCAL
: the “ours” side of the conflict – ie, your branch (HEAD
) that will contain the results of the mergefoo.REMOTE
: the “theirs” side of the conflict – the branch you are merging intoHEAD
foo.BASE
: the common ancestor. useful for feeding into a three-way merge toolfoo.BACKUP
: the contents of file before invoking the merge tool, will be kept on the filesystem ifmergetool.keepBackup = true
.