PowerShell git: The term git is not recognized as the name of a cmdlet


PS C:\Users\c2c> git --version
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 --version
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

If you trying to run Git on PowerShell and you get the above error then make sure you re-run your Git-Bash Installation Setup to add the option to "Let git run from the command line or 3rd party tools", or simply add the Git path to the Path Environment Variable.

Git Setup - Adjust your path Environment
Git Setup - Adjust your path Environment
  1. In Search type "Edit Environment variable for your account",
  2. Click on "Environment Variables..." button,
  3. Under System Variables -> Path add: C:\Program Files\Git\cmd
  4. Click Ok and restart PowerShell.


Have Questions? Post them here!

πŸŽ‰ We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram