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!


















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap