-2

I prepared a project and would like to commit to Github. A also have Git + GitHub desktop and use VSCode and terminal in it. So, when i try to check 'git' from the terminal in VSCode in folder with project i have the problem:

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
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

When using common cmd all is OK! How could i fix it?

phd
  • 82,685
  • 13
  • 120
  • 165
  • https://stackoverflow.com/search?q=%5Bgit%5D+The+term+%27git%27+is+not+recognized+as+the+name+of+a+cmdlet%2C+function%2C+script+file%2C+or+operable+program – phd Aug 18 '20 at 12:42

1 Answers1

0

This is because your git executable (git.exe) directory is not set up in the PATH variable, so PowerShell is unable to find it.

You need to locate the folder in which git is installed and add it in PATH using Windows' environment variables editor.

See detailed instructions in this answer.

albeksdurf
  • 124
  • 8