Skip to content

Instantly share code, notes, and snippets.

@emlun
Last active August 29, 2015 14:27
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 emlun/784d37e4b70b0f5d5fee to your computer and use it in GitHub Desktop.
Save emlun/784d37e4b70b0f5d5fee to your computer and use it in GitHub Desktop.
My git alias configuration
# This is free and unencumbered text released into the public domain.
# For more information, please refer to <http://unlicense.org/>
[alias]
a = add -up
aa = !yes a | git a
amend = commit --amend -C HEAD
d = diff
di = diff --ignore-all-space
dw = diff --color-words
dwi = diff --color-words --ignore-all-space
dc = diff --cached
dci = diff --cached --ignore-all-space
dcw = diff --cached --color-words
dcwi = diff --cached --color-words --ignore-all-space
s = show -p
si = show -p --ignore-all-space
sw = show -p --color-words
swi = show -p --color-words --ignore-all-space
st = status
sti = status --ignored
stn = status -uno
stu = status -uall
br = branch -v
bra = branch -av
f = fetch
fa = fetch --all
fap = fetch --all --prune
# Fix whitespace
fw = !git commit --allow-empty -m TMP_FIX_WHITESPACE && git aa && git checkout . && git reset && git reset --soft HEAD~
logg = log --graph
logga = log --graph --all
lg = log --graph --abbrev-commit --format=format:'%C(bold red)%h%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lga = log --graph --abbrev-commit --date=relative --format=format:'%C(bold red)%h%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lgt = log --graph --abbrev-commit --date=relative --format=format:'%C(bold red)%h%C(reset) %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lgtt = log --graph --abbrev-commit --date=short --format=format:'%C(bold red)%h%C(reset) %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lgat = log --graph --abbrev-commit --date=relative --format=format:'%C(bold red)%h%C(reset) %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lgatt = log --graph --abbrev-commit --date=short --format=format:'%C(bold red)%h%C(reset) %C(bold green)(%ad)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
ra = rebase --abort
rc = rebase --continue
sp = stash show -p
spw = stash show -p --color-words
stashk = stash --keep-index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment