1

How can I revert these commands:

git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"

I think this is the reason why "Compare with previous" from Visual Studio is launched in vscode.

The commands I posted were intended to make vscode launch as the diff tool from cmd but it didn't work.

annepic
  • 583
  • 2
  • 9
  • 20

1 Answers1

1

Here are my settings

[diff]
    tool = vsdiffmerge
[difftool]
    prompt = true
[difftool "vsdiffmerge"]
    cmd = \"E:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t
    keepBackup = false

Though, you should also be able to set these settings from VS directly.

Tanveer Badar
  • 4,541
  • 2
  • 27
  • 31
  • Tanveer where you do you have these, in the .gitconfig of a project or is there a way to set these globally? Thank you – annepic Apr 03 '18 at 07:03
  • VS allows both global and repository configurations. I copied mine from a repository's config file in .git folder. – Tanveer Badar Apr 03 '18 at 07:04
  • So each project has a .git folder accesible by \.git in Explorer, is there also a global repository where I can have basic git settings? (that I could override or extend as needed in each project). Thank you! – annepic Apr 03 '18 at 07:13
  • Yes, each repository has its own .git folder. I am not sure, though, where global settings are saved. A little googling should be able to answer that if you are interested. – Tanveer Badar Apr 03 '18 at 07:15
  • 1
    There are some variants here: https://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to I'll look into it. Thanks Tanveer! – annepic Apr 03 '18 at 07:33