Skip to content

Instantly share code, notes, and snippets.

@sheniff
Created June 23, 2015 16:33
Show Gist options
  • Save sheniff/aa5b17d1a099566875a0 to your computer and use it in GitHub Desktop.
Save sheniff/aa5b17d1a099566875a0 to your computer and use it in GitHub Desktop.
Git aliases
alias g='git'
alias gs='git status -s'
alias grb='git rebase'
alias rbm='git rebase master'
alias gra='git rebase --abort'
alias gah='git reset --hard'
alias gr2='git rebase -i -p HEAD~2'
alias gr3='git rebase -i -p HEAD~3'
alias gr4='git rebase -i -p HEAD~4'
alias gr5='git rebase -i -p HEAD~5'
alias grc='git rebase --continue && rmorig'
alias grmorig="find . -iname '*.orig' -exec mv \{\} ~/.Trash \;"
alias gco='git checkout'
alias gcmaster='git checkout master'
alias gcb='git checkout -b'
#update to latest changes
alias gup='git pull y master && git push origin master'
alias gp='git push'
alias gpo='git push origin'
alias gpt='git pull tapjoy master'
alias gamend='git commit --amend'
alias gcm='git commit -m'
alias gap='git add -p'
alias ga.='git add .'
alias gr='git remote'
alias grv='git remote -v'
alias gmt='git mergetool'
alias gst='git stash'
alias gsp='git stash pop'
alias gpr='git pull-request'
alias blame='git blame'
alias gb='git branch -vv'
alias gbd='git branch -d'
alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset' --abbrev-commit --date=relative"
alias gprune='git branch --merged master | grep -v "master$" | xargs git branch -d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment