1

I am new to using Git. So I was watching some tutorial where they were using Notepad as the default editor. But I want to use VSCode as my default editor. So when I was using commands like -

git config --global -e
git commit

Instead of opening my editor, it gives me information about my CPU and Memory.

CPU

What am I doing wrong?

Yet, Code.exe is in my PATH:

PATH

And here is my config:

config

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • You could install a recent version of git for Windows that is now setting Vscode as the default editor... – Philippe Mar 05 '18 at 07:19

1 Answers1

1

Instead of -multiInst -nosession, try, as mentioned here, the --wait option:

git config --global core.editor "Code.exe -w"
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Can you help me out a little bit more? Whenever I try to commit something, It says, There was a problem with the editor 'Code.exe --wait'. Please supply the message using either -m or -F option. Why is this happening? – theinterpreter17 Mar 05 '18 at 10:57
  • @theinterpreter17 What version of Git are you using? – VonC Mar 05 '18 at 11:48
  • @theinterpreter17 Can you try with the full path for code.exe, as in https://stackoverflow.com/a/34058535/6309? – VonC Mar 05 '18 at 11:49
  • @theinterpreter17 see also https://stackoverflow.com/a/36644561/6309 (provided you are using the latest VSCode and latest Git) – VonC Mar 05 '18 at 12:00