use*_*847 5 git macos github github-for-mac
我为mac设置了github
,现在我正在尝试使用终端的git命令.
如果我尝试运行该git rebase命令,我会收到以下消息
> cd /Applications/GitHub.app/Contents/Resources/git/bin
> git rebase
git: 'rebase' is not a git command. See 'git --help'.
>git --help
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
The most commonly used git commands are:
...
rebase Forward-port local commits to the updated upstream head
....
Run Code Online (Sandbox Code Playgroud)
因此,从帮助输出中可以看到选项rebase存在.
我的git有什么问题?
git --version
git version 1.7.8.2
Run Code Online (Sandbox Code Playgroud)
对我来说,我发现要修复此错误消息(" 'rebase' is not a git command")我需要 设置Git"exec-path",或者通过命令行进行一次性使用,或者更好地通过环境变量:
export GIT_EXEC_PATH=/PATH/TO/git/libexec/git-core
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3295 次 |
| 最近记录: |