I\'ve found this post that explains how you can have Visual Studio 2013 use the built-in diff tool when comparing files in Git, but I\'m having the opposite problem. Right now w
Visual Studio uses the diff.tool
configuration setting, not the diff.guitool
configuration setting.
Try:
[diff]
tool = TortoiseMerge
I have had the same issue recently in Visual Studio 2012. I will post the solution here as this is the first thread I found when searching.
My .gitconfig file looked like this:
[merge]
tool = kdiff3
[diff]
tool = kdiff3
[difftool]
prompt = true
[difftool "kdiff3"]
path = "C:/Program Files/KDiff3/kdiff3.exe"
keepBackup = false
trustExitCode = true
[mergetool]
prompt = true
[mergetool "kdiff3"]
cmd = "C:/Program Files/KDiff3/kdiff3.exe" $BASE $LOCAL $REMOTE -o $MERGED
keepBackup = false
trustExitCode = true
[mergetool "vsdiffmerge"]
cmd = "C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/vsdiffmerge.exe" /m $REMOTE $LOCAL $BASE $MERGED
keepbackup = false
trustexistcode = true
The problem was the newlines between config sections.
Changing the file to this worked correctly:
[merge]
tool = kdiff3
[diff]
tool = kdiff3
[difftool]
prompt = true
[difftool "kdiff3"]
path = "C:/Program Files/KDiff3/kdiff3.exe"
keepBackup = false
trustExitCode = true
[mergetool]
prompt = true
[mergetool "kdiff3"]
cmd = "C:/Program Files/KDiff3/kdiff3.exe" $BASE $LOCAL $REMOTE -o $MERGED
keepBackup = false
trustExitCode = true
[mergetool "vsdiffmerge"]
cmd = "C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/vsdiffmerge.exe" /m $REMOTE $LOCAL $BASE $MERGED
keepbackup = false
trustexistcode = true