The “git” item cannot be recognized as the name of a cmdlet, function, script file, or executable program. Please check the spelling of the name, if you include the path, make sure the path is correct

Errors encountered when running git related commands in the terminal or node.js:



1. Find the path of bin in the git installation on your computer, such as: C:\Users\XXX\Git\Git\bin; at the same time, find the location of git-core in the git installation path, such as: C:\Users\XXX \Git\Git\libexec\git-core;

XXX is the system name;

2. Configure system variables. Right-click “Computer” -> “Properties” -> “Advanced System Settings” -> “Environment Variables” -> Find “path” in the “System Variables” below -> select “path” and select “Edit” -> Copy the bin and git-core paths found in 1 to the left. Save and exit.

Then re-run git, success!


Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *