Skip to content

Instantly share code, notes, and snippets.

@evilstreak
Created March 14, 2014 15:56
Show Gist options
  • Save evilstreak/9550596 to your computer and use it in GitHub Desktop.
Save evilstreak/9550596 to your computer and use it in GitHub Desktop.
Git aliases
[alias]
amend = commit --amend -C HEAD
c = commit
cm = commit -m
co = checkout
d = diff --no-prefix
dc = diff --no-prefix --cached
f = fetch --prune
ff = merge --ff-only
ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore
l = log --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
lg = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s'
ll = log --stat --abbrev-commit
rc = rebase --continue
rd = push origin --delete
s = status --short --branch
track = !git branch --set-upstream-to=origin/$(git rev-parse --abbrev-ref HEAD)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment