Skip to content

Instantly share code, notes, and snippets.

@matjack1
Created September 2, 2014 13:27
Show Gist options
  • Save matjack1/e96723d329db1a36212a to your computer and use it in GitHub Desktop.
Save matjack1/e96723d329db1a36212a to your computer and use it in GitHub Desktop.
Git shortcuts
alias g='git'
alias ga='git add'
alias gaa='git add --all .'
alias gap='git add --patch'
alias gb='git branch'
alias gbn='git checkout -b'
alias gbb='git branch -a'
alias gbrrm='git push --delete'
alias gblrm='git branch -D'
alias gcp='git cherry-pick'
alias gc='git commit -v'
alias gc!='git commit --amend -v --date="$(date)"'
alias gcl='git clean -fd'
alias gco='git checkout'
alias gcm='git checkout master'
alias gd='git diff --ignore-space-at-eol -b -w --ignore-blank-lines'
alias gf='git fetch --prune'
alias gi='git update-index --assume-unchanged'
alias giu='git update-index --no-assume-unchanged'
alias glg='git log --oneline --decorate --stat --graph'
alias gl='git pull'
alias glr='git pull --rebase'
alias gm='git merge'
alias gp='git push'
alias grb='git rebase'
alias grbi='git rebase --interactive'
alias grbc='git rebase --continue'
alias grba='git rebase --abort'
alias grh='git reset --hard'
alias gs='git status'
alias gsh='git stash'
alias gshp='git stash pop'
alias gshd='git stash drop'
alias gshl='git stash list'
alias gu='git checkout --'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment