Cygwin git pull not a command

3

0

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.

Pierre-Antoine LaFayette

Posted 2010-10-11T21:37:37.487

Reputation: 987

Answers

1

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

Jeremy W

Posted 2010-10-11T21:37:37.487

Reputation: 3 529

1

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.

user169771

Posted 2010-10-11T21:37:37.487

Reputation: 134

0

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

Try installing Perl and disabling your anti-virus temporarily.

vonhogen

Posted 2010-10-11T21:37:37.487

Reputation: 1 949

0

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

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

harrymc

Posted 2010-10-11T21:37:37.487

Reputation: 306 093

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 – 2010-10-21T02:33:12.207

Yes, one of the listed solutions was a clean reinstall. – harrymc – 2010-10-21T05:48:19.730

0

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.

nauman hafiz

Posted 2010-10-11T21:37:37.487

Reputation: 1