我安装了GitHub for Mac,现在我想从终端使用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
....
从帮助输出中可以看出,rebase选项是存在的。
我的git有什么问题吗?
git --version
git version 1.7.8.2
$PATH
是什么?我本以为你必须从该目录中使用./git
而不是仅仅使用git
来运行git
,因为我猜测这样会选择系统安装的版本。 - trojanfoe