For demo purposes I was trying to configure the diff tool for Git to WinDiff.
However, the last command failed and gave the git config
help:
C:\...> git config --global diff.tool windiff
C:\...> git config --global difftool.windiff.path "C:\Program Files (x86)\WinDiff\"
C:\...> git config --global difftool.windiff.cmd "C:\Program Files (x86)\WinDiff\WinDiff.exe"
C:\...> git config --global difftool.windiff.cmd "C:\Program Files (x86)\WinDiff\WinDiff.exe"
"$LOCAL" "$REMOTE"
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
[...]
(the line break between WinDiff.exe and "$LOCAL" is just for readability)
My Question
I can't figure out myself what I'm doing wrong. How do I set up WinDiff as the diff tool?
This is more an academic question. I don't actually want to use WinDiff, but I am preparing a training for Git and I would like to understand why that happens and how to resolve it, since I'll probably be a main contact regarding Git questions.
D:\...> git version
git version 2.13.0.windows.1
I have tried
Since the last command did not work, I looked up how WinMerge was set up:
D:\...> git config --get difftool.winmerge.cmd
"C:/Program Files (x86)/WinMerge/winmergeu.exe" -e -u "$LOCAL" "$REMOTE"
I saw that it uses forward slashes, so I tried that, too:
C:\...> git config --global difftool.windiff.cmd "C:/Program Files (x86)/WinDiff/WinDiff.exe"
"$LOCAL" "$REMOTE"
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
[...]
Unsetting does not help either:
C:\...> git config --global --unset difftool.windiff.cmd
I have tried on my colleague's PC with the same result.