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?
If you installed Git 64bit, without changes to default installation folder, git will be at
C:\Program Files\Git\bin;C:\Program Files\Git\cmd
If you don't know where your Git folder is: In windows 7/8/10 git should be found:
-
C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd
-
C:\Program Files\Git\bin;C:\Program Files\Git\cmd
Close the cmd prompt and exit. Then reopen cmd prompt.
On Windows use msysgit to get a bash prompt with a git command.
add above path in environment variables
note: path may differ but you should add both
bin
andcmd
For Windows 10 Users:
Try running a command prompt window as an administrator. Type:
You should receive an answer, something like "git version 2.17.1.windows.2".
If you do receive something similar to the answer above, try running your Git Bash window as an administrator.
Type the same command:
You should now see that you are logged in to the Git Bash shell with colored text and everything.
Mine would not work no matter what until I was using the git bash shell as an administrator. Just wanted to share in case someone else encounters a similar issue.
I installed Git and tried using Command prompt under actions in Team explorer/Changes.