Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have downloaded and installed GIT from http://git-scm.com/download/win

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"?

share|improve this question

migrated from stackoverflow.com Mar 20 '13 at 16:08

This question came from our site for professional and enthusiast programmers.

1  
Could you post your windowd PATH? –  poiuytrez Mar 20 '13 at 14:51
    
Sorry, you'll have to explain. –  Barney Mar 20 '13 at 14:52
    
When clicking through the installer, one of its pages is about how much of Git programs make available to you by modifying the system PATH env. variable. For unknown reason it defaults to "none", and normally you should tick the option to provide access to Git commands only (the middle one as it appears on that page). –  kostix Mar 20 '13 at 15:11
add comment

2 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.

share|improve this answer
    
This still gives me the 'command not found' error. However git's bash works by itself. Cygwin doesn't seem to want to work with Git. –  Ben Racicot Oct 1 '13 at 23:33
    
@BenRacicot In this case, as Don said in his post, rerun the cygwin setup.exe installer, and you should be able to install git in cygwin. –  LaGrandMere Oct 2 '13 at 7:01
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.