git: not a git command

在一臺linux機器上打git命令,顯示:linux

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

Did you mean this?
        shell

莫名的錯誤,再敲git

$ git --exec-path
$ /usr/local/linux/git/libexec/git-core

發現這個路徑不存在,找到git-core正確的安裝位置,從新設置環境變量便可shell

$ export GIT_EXEC_PATH=$RIGHT_PATH

或者執行的時候帶參數bash

$ git --exec-path=$RIGHT_PATH
相關文章
相關標籤/搜索