Here is the git plugin I enabled in oh-my-zsh
To enable the plugin:
vim ~/.zshrc
plugins=(git git-flow tmux rails ruby zsh-syntax-highlighting rake gem brew npm)
Now you can use some alias the plugin provided. To name a few:
gco BRANCH = git checkout BRANCH
grbi = git rebase -i
gcmsg = git commit -m
You can see the full list with
alias | grep git
A useful one is current_branch
(use the backtick). I use this when I specify which branch I want to deploy.
Another git tool that deserves attention is the gem git-up
The problem of git pull
is that instead of rebase it merge the upstream. This will make the git graph messy. git-up
uses pull --rebase
on all your local branch from the origin. No more checkout-and-pull loop anymore.