简体   繁体   中英

How to resolve git 'pull' is not a git command in Linux

I have cloned the git repository in Linux server and able to run git fetch, git status, git log commands.

I am getting an error while i run git pull as below:

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

Did you mean this?
        shell

HOW TO RESOLVE THIS ERROR.

This looks like a broken installation of Git, I'd recommend to reinstall (on Ubuntu, this would be via sudo apt-get install git ). The pull command is implemented as a shell script called git-pull located in the path returned by git --exec-path . You might want to check if the file is there.

It seems like the 'pull' command isn't in your path.

Try adding the following to your .bashrc, or whatever shell you're using:

export GIT_EXEC_PATH=/opt/local/libexec/git-core

And if necessary, reload bash.

for me nothing above worked.

Solution:

There was some bad character that was displaying as space but actually it was something else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM