I ran this command twice today, the second time to experiment with the quotes because the setting didn’t seem to have an effect:
git config --global difftool.vs2012.cmd "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" -diff "$LOCAL" "$REMOTE"
Now when I run this:
git config --global --get difftool.vs2012.cmd
I get this:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
error: More than one value for the key difftool.vs2012.cmd: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Note the error.
Running git difftool -t vs2012 still doesn’t work, but my question is how to remove the apparent duplicate key-value pair in the Git config file somewhere?
While typing this question, I ran the first command again and I now seem to have it 3 times! Why does it keep adding more and more instead of overwriting?
And where is the config file so I can edit it using Notepad instead of this awful, awful command line syntax?
I thought Git was going to be good the way people bang on about it.
P.S. The following question doesn’t mention how to resolve it.
To remove the duplicates, I had to edit
.gitconfigin my home directory (Windows profile) in a text editor that honors the line-endings.Git, being a Linux thing, and Linux people thinking that the way they do stuff is in God’s vision, they ignore the line-endings of the Windows platform they’re running on, so be careful not to mangle the file by using just any text editor on Windows.