Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All of a sudden git pull stopped working on cygwin. It gives me this recursive error message.

git: 'pull' is not a git command. See 'git --help'.

Did you mean this?
        pull

I can do a git status and other git commands but for some reason pull doesn't want to work. It had previously been working for a long time before this. I've been seeing this issue after a restart. I tried clobbering and doing a full reinstall of cygwin but I'm still having the same problem. My paths seem to be fine.

$ type -a git
git is /usr/bin/git
git is /bin/git

More info: The executables for the git commands appear to be under /usr/lib/git-core and git-pull is a shell script with no extension and the !/bin/sh header.

share|improve this question

You may have a missing directory in your cygwin path.


Add these lines to your ~/.bashrc:

export GIT_EXEC_PATH=/opt/local/libexec/git-core
$PATH=/opt/local/libexec/git-core:$PATH
export PATH
share|improve this answer

This problem occurred for me because Windows Update had installed updates and a reboot was pending. I think git pull was trying to utilize some library or other file that Windows had replaced with the update.

I tried running git.exe manually from the /usr/libexec/git-core folder and got an 0xC0000056 error code from Windows, which means STATUS_DELETE_PENDING. Googling this got my answer that a reboot was needed.

After a reboot, git pull worked correctly.

tl;dr if you hit an error like OP's try running git.exe manually and searching for a resolution for the error that gives you.

share|improve this answer

Do you have Perl installed, and do you have an anti-virus running?

Try installing Perl and disabling your anti-virus temporarily.

share|improve this answer
    
Thanks, not the issue. – Pierre-Antoine LaFayette Oct 21 '10 at 2:33

Maybe one of the answers to these StackOverflow questions can help :

“git pull” broken
Git pull cygwin not a git-command

share|improve this answer
    
Thanks, but I've seen those. They don't seem to be relevant for my case. The only thing I can think of is that my cygwin is originally based of the webkit cygwin bundle. Maybe something is invalid with that config. I'll try clean installing from the internet next. – Pierre-Antoine LaFayette Oct 21 '10 at 2:33
    
Yes, one of the listed solutions was a clean reinstall. – harrymc Oct 21 '10 at 5:48

the easiest way to fix this issue is to re/install git via cygwin setup.exe

i had the same issue and had not installed git via the cygwin setup so the paths and env variables were not hooked up.

installing it via setup resolved the problem.

share|improve this answer

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.