Skip to content

Instantly share code, notes, and snippets.

@rpond-pa
Created July 22, 2014 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpond-pa/98e48dc346ff78ea7a7a to your computer and use it in GitHub Desktop.
Save rpond-pa/98e48dc346ff78ea7a7a to your computer and use it in GitHub Desktop.
git aliases
alias.br branch
alias.bra branch -a
alias.check diff --check
alias.ci commit -v
alias.cl clone
alias.co checkout
alias.com checkout master
alias.cp cherry-pick
alias.d diff
alias.dc diff --cached
alias.dch diff --cached HEAD^
alias.diff diff --word-diff
alias.fl !git ls-files | grep -i
alias.gr grep -Ii --break --heading --line-number
alias.graph log --all --graph --decorate --oneline
alias.grep grep -Ii --break --heading --line-number
alias.l log --decorate --oneline
alias.lb log --no-merges master.. --decorate --stat
alias.ll log --decorate --stat --oneline
alias.ls log --decorate
alias.p pull
alias.pr pull --rebase
alias.rh reset HEAD
alias.rhh reset HEAD --hard
alias.rhs reset HEAD --soft
alias.rmsub !f(){ git rm --cached "$1";rm -r "$1";git config -f .gitmodules --remove-section "submodule.$1";git config -f .git/config --remove-section "submodule.$1";git add .gitmodules; }; f
alias.sa stash apply
alias.sl stash list
alias.ss stash save
alias.st status -s
alias.wc whatchanged -p --abbrev-commit --pretty=medium
alias.wcb whatchanged -p --abbrev-commit --pretty=medium master..
alias.who shortlog -n -s --no-merges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment