I am finding the built-in TortoiseGitMerge tool very underpowered at dealing with even slightly complex changes, so am looking for an external tool that might do a better job.
I am trialling WinMerge, however in the three-pane merge, the left pane is empty and titled 'base'. In the repository, TortoiseGit has created for file.cs
file.cs.BASE.cs
file.cs.LOCAL.cs
file.cs.REMOTE.cs
The local and remote files are populated, but the base file is 0 bytes, when the documentation suggests this is should contain the unmodified file. What am I doing wrong?
The automatically generated WinMerge call is
C:\Program Files\WinMerge\WinMergeU.exe /e /ub /fr /wl /wm /dl %bname /dm %tname /dr %yname %base %theirs %mine /o %merged /ar
While I haven't found documentation on the macro names, I presume %base is passing the name file.cs.BASE.cs, which is empty, and showing that file in the left window.
Update: Having found the documentation it doesn't shed any further light on why the *.BASE.cs file is empty, and the suggestion is that the command line is correct.
The BASE file is zero bytes when there is no common file origin to draw from in the merge. This is not covered in the TortoiseGit documentation, however does appear with the phrase 'if available' in the underlying Git documentation.
This can happen if a file is copied outside of a merge operation between branches that are later merged.
There is no graceful handling of the case where there is no base file, and many merge tools do not work well in this case. Kdiff3 does at least allow manually setting the base file to one or other files, allowing the merge to proceed.