I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error:
'git' is not recognized as an internal or external command,
operable program or batch file.
How do I fix this problem?
2022-09-04
I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error:
'git' is not recognized as an internal or external command,
operable program or batch file.
How do I fix this problem?
You may not have set your PATH correctly to point at your Git installation.
You need to add the following paths to PATH:
C:\Program Files\Git\bin\C:\Program Files\Git\cmd\And check that these paths are correct. You may have Git installed on a different drive, or under Program Files (x86). Correct the paths if necessary.
Modifying PATH on Windows 10:
C:\Program Files\Git\bin\ and C:\Program Files\Git\cmd\ to the end of the list.Modifying PATH on Windows 7:
; if there is not already one, and then C:\Program Files\Git\bin\;C:\Program Files\Git\cmd\. Do not put a space between ; and the entry.If these instructions weren't helpful, feel free to look at some others: