1

I'm trying to initialize Git in Visual Studio Code, but it is giving me errors. I already have it included in my path.

git : The term 'git' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ git init
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Felicio Pedro
  • 23
  • 1
  • 4
  • 3
    Go to Settings and search for "path". It will give you an option under "Git" to set the path to the executable. In the `settings.json`, the key is `"git.path": ""`. – Daniel W. Sep 29 '21 at 11:38
  • "*I already have it included in my path.*" Which path and what exactly did you put in the path? Does the `git` command work _outside_ of VS Code? – Gino Mempin Oct 03 '21 at 03:16
  • Likely canonical (2015, 36 answers, and 221 votes): *[Visual Studio Code cannot detect installed Git](https://stackoverflow.com/q/29971624/)*. – Peter Mortensen Dec 17 '22 at 01:58

1 Answers1

3

If you already have Git/cmd PATH included in environment variables, Restart Visual Studio Code

Or...

Append Git/cmd to PATH in environment variables

C:\Program Files\Git\cmd
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131