2

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
3
  • 4
    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": "". Commented Sep 29, 2021 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? Commented Oct 3, 2021 at 3:16
  • 1
    Likely canonical (2015, 36 answers, and 221 votes): Visual Studio Code cannot detect installed Git. Commented Dec 17, 2022 at 1:58

1 Answer 1

5

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
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.