WinMerge + Git = mergetool


I have been using the wonderful WinMerge tool for a long time, and I wish you the same. And now it’s time to merge conflicts on the git .. and the built-in tools or any alternative Git GUI turned out to be very buggy (tested a dozen) for exactly what I need. As a result, it turned out to be cheap and cheerful to check everything in WinMerge.

To use it, in a file C:\Users\<user>\.gitconfig add:

[mergetool]
    prompt = false
    keepBackup = false
    keepTemporaries = false
[merge]
    tool = winmerge
[mergetool "winmerge"]
    name = WinMerge
    trustExitCode = true
    cmd = "'C:/Program Files/WinMerge/WinMergeU.exe'" -u -e -dl \"Local\" -dr \"Remote\" $LOCAL $REMOTE $MERGED
[diff]
    tool = winmerge
[difftool "winmerge"]
    name = WinMerge
    trustExitCode = true
    cmd = "'C:/Program Files/WinMerge/WinMergeU.exe'" -u -e $LOCAL $REMOTE

Further, in order to call it yourself, after rebase (or whatever you have) we write:

git mergetool

Alliluyya!


This entry was posted in Git (en). Bookmark the permalink.

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.