I'm using msys Git for source control on a Windows machine and I'm trying to figure out how to get my merge tool, WinMerge, to work with Git.
I've followed the instructions on this blog to the best of my ability since it's the closest I've found to what I'm trying to do. Basically what I did was:
Modify my .gitconfig
file to include the following:
[merge] tool = winmerge [mergetool "winmerge"] cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" "$PWD/$LOCAL" "$PWD/$REMOTE" "$PWD/$MERGED" trustExitCode = false keepBackup = false
This is almost working. When I try to run the merge tool from Git, WinMerge gives me an error saying it can't find the paths of the files, which makes complete sense since the paths it is looking for are:
C:\MY\WORKING\DIRECTORY\-e C:\MY\WORKING\DIRECTORY\-ub
It looks like Git is passing options into the merge tool instead of the local & remote file names that I would expect to get passed if everything was working correctly.
I've searched online for Git's merge documentation, but I can't seem to find anything related to what I'm trying to do. My guess is that the solution will be one of the following:
- Change the
$LOCAL
&$REMOTE
variables to the correct values, assuming$LOCAL
&$REMOTE
are incorrect. - Write a
.bat
script to call WinMergeU, and handle the arguments Git sends to the merge tool within the logic of my.bat
script.