I set up github for mac
and now I am trying to use the git command from the terminal.
If I try to run the git rebase
command I get the following message
> 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
....
So as you can see from the help output the option rebase is present.
What is wrong in my git?
git --version
git version 1.7.8.2
For me, I found that to fix this error message ("'rebase' is not a git command
") I needed to set up Git "exec-path", either via command-line for one-shot use, or better via environment variable:
export GIT_EXEC_PATH=/PATH/TO/git/libexec/git-core
You're using the Git build that comes with GitHub for Mac. They (GitHub, that is) probably modified the binary to remove features that GitHub for Mac doesn't use.
You should really install your 'own' Git. I recommend using Homebrew: Link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With