Git: Command not found Windows

I have downloaded and installed GIT from

For some reason, in Cygwin and in Command prompt (Windows 8), the git command is not found.

I selected the option for Windows explorer integration and the "GIT GUI/ repo here" option appears when I right click in file explorer.

Can anyone explain why typing "git -v" or "git --version" gives a "command not found"?

3

4 Answers

You need to have C:\Program Files\Git\cmd in your path. Make sure it is there, start a new cmd prompt, type git --version.

2

As LaGrandMere explained, it's because git is not in your path. Instead of downloading and installing git, an easier alternative might be to run the cygwin setup.exe, and select git there. It will go into a directory that's already in your path (/usr/bin) and you will be able to run it from a bash prompt.

The one you installed works with the explorer, but that doesn't require the command to be in the path.

The git bash PATH is different from the Windows PATH. You need to add the the bash path (in .bashrc) "/c/Progam Files/git/bin"

For me using Windows 10 the Git/cmd/ folder is located in %USERPROFILE%\Appdata\Local\Programs\Git\cmd

Adding that to the Path Variable in the List "System Vairables" worked.

You need to restart your cmd. Then you should be able to execute the following command git --version.

If you're working with a IDE then you maybe have to restart that too!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like