The error "'git' is not recognized as the name of a cmdlet" can occur when Git is not properly installed or configured on a Windows system. Here are some ways to resolve the error.
"'git' is not recognized as the name of a cmdlet" - 3 ways to resolve the error |
Restart Command Prompt
If you have already opened Command Prompt before you install Git for Windows, the latest variables changes might not be updated, which could be one of the reasons why you got the error message. To solve the problem, you can exit Command Prompt, search for Command Prompt in the Windows Search utility, right-click it, and select Run as administrator.
Reinstall Git for Windows
If the Git path is not configured correctly, you could also receive the error "git is not recognized as an internal or external command, operable program or batch file". You can try reinstalling Git for Windows to set the path automatically.
Configure the Git Path Manually
You can configure the Git path manually by adding the Git installation path to the PATH environment variable. Here are the steps to do it:
- Open the Windows Search utility and search for "environment variables".
- Click on the "Edit the system environment variables" option.
- Click on the "Environment Variables" button.
- In the "System Variables" section, find the "Path" variable and click "Edit".
- Click "New" and type the installation path for your Git. For example, it could be "C:\Program Files\Git\bin" or "C:\Program Files (x86)\Git\bin".
- Click "OK" to close all the windows.
Now try typing "git" in the Command Prompt and check if the error disappears.
Few good reads on the topic "'git' is not recognized as the name of a cmdlet":
- https://stackoverflow.com/questions/4492979/error-git-is-not-recognized-as-an-internal-or-external-command
- https://www.partitionwizard.com/partitionmanager/git-is-not-recognized.html
- https://youtube.com/watch?v=H8zpilJ-wgM&t=13
- https://www.positioniseverything.net/git-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file./
- https://github.com/nodejs/help/issues/786
- https://www.edureka.co/community/13069/error-git-is-not-recognized-as-internal-or-external-command
Comments
Post a Comment