I'm using Git with VS2017 Enterprise, and if I right-click a file in Changes and choose "Compare with unmodified" it opens in a new window in VS using the VS diff tool.
I would like to use WinMerge instead, and have been looking at resources such as this (instructions for BeyondCompare, but the principle should be the same), this (ditto for GitExtensions) and this, but cannot get it to work. Whatever I do, I still get the VS diff tool in VS.
The .gitconfig file in my user folder looks like this...
[user]
name = Me
email = [email protected]
[core]
autocrlf = true
[diff]
tool = winmerge
[difftool "winmerge"]
cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -e "$LOCAL" "$REMOTE"
...and the .git/config file in my project folder looks like this (sensitive info changed)...
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[user]
[diff]
tool = winmerge
[difftool]
prompt = true
[difftool "winmerge"]
cmd = "/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe" -u -e $LOCAL $REMOTE
keepBackup = false
[merge]
tool = vsdiffmerge
[mergetool]
prompt = true
[remote "origin"]
url = https://[email protected]/me/Project/_git/Project
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[gui]
wmstate = normal
geometry = 1346x938+75+75 445 196
Anyone able to tell me what I need to do to use WinMerge?
Winmerge is installed. Git for windows is installed, from "git version 2.12. 0. windows1" or above (although earlier versions of git may have introduced the command).
In the displayed dialog box, select the Source Control → Visual Studio Team Foundation Server node. Click the Configure User Tools button to set up diff and merge tools. Click the Add button to add an external tool for comparison or merging.
WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
Your problem is that...
/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe
...is an incorrect path. If you look in your first code snippet, you'll see the correct path, however this is overridden by the project's config file.
If you change the path in the second snippet, or (better still) remove that whole section, as it only duplicates what's in the first, then you should find it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With