Skip to content

Instantly share code, notes, and snippets.

@andycasey
Created February 17, 2014 10:42
Show Gist options
  • Select an option

  • Save andycasey/9048403 to your computer and use it in GitHub Desktop.

Select an option

Save andycasey/9048403 to your computer and use it in GitHub Desktop.
Git aliases
alias status='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gca='git commit -a'
alias gd='git diff'
alias gco='git checkout '
alias gk='gitk --all&'
alias gx='gitx --all'
alias gp='git pull'
alias push='git push'
alias pull='git pull'
alias gr='git rebase '
alias gm='git merge '
alias r='rails'
alias assume="update-index --assume-unchanged"
alias unassume="update-index --no-assume-unchanged"
alias assumed="!git ls-files -v | grep ^h | cut -c 3-"
alias snapshot='!git stash save "snapshot: $(date)" && git stash apply "stash@{0}"'
alias ours="!f() { git checkout --ours $@ && git add $@; }; f"
alias theirs="!f() { git checkout --theirs $@ && git add $@; }; f"
alias snapshots="git stash list --grep snapshot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment