0

I correctly installed GIT, but vs code command prompt responds:

"Git is not recognized as an internal or external command,operable program or batch file."

After adding:

"git.enabled": true,
"git.path": "C:\\'Program Files'\\Git\\mingw64\\bin\\git.exe",

it still won't work. Even after closing and opening vs code.

mklement0
  • 312,089
  • 56
  • 508
  • 622
  • 1
    Does this answer your question? [What is the reason for "X is not recognized as an internal or external command, operable program or batch file"?](https://stackoverflow.com/questions/41454769/what-is-the-reason-for-x-is-not-recognized-as-an-internal-or-external-command) Remove also both `'` in `git.path` string value. – Mofi Feb 03 '22 at 07:25

2 Answers2

0

Have you tried using escaped double-quotes in your .json file, instead of adding single-quotes, which do not exist within the path a all?

  "git.path": "\"C:\\Program Files\\Git\\mingw64\\bin\\git.exe\"",
Compo
  • 34,184
  • 4
  • 22
  • 36
-1

If vs code doesn't close your internal command prompt and reopens with it again, you have to close the cmd manually.

  • It sounds like you're saying that the change only takes effect in _future_ shells running in VS Code's integrate terminal, correct? – mklement0 Feb 03 '22 at 02:49
  • Also, it's not clear _what file_ you've added the lines in your question to. – mklement0 Feb 03 '22 at 03:08