Skip to content

Instantly share code, notes, and snippets.

@emlun
Last active June 22, 2016 08:08
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/6b88f35dba180d2221fa37c2dbabae84 to your computer and use it in GitHub Desktop.
Save emlun/6b88f35dba180d2221fa37c2dbabae84 to your computer and use it in GitHub Desktop.
Git config
[core]
autocrlf = input
editor = vim
[push]
default = simple
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = cyan
frag = magenta bold
old = red
new = green
[color "status"]
added = green
changed = red
untracked = yellow
[log]
decorate = short
[apply]
whitespace = fix
[rebase]
autosquash = true
[alias]
a = add -up
aa = !yes a | git a
amend = commit --amend -C HEAD
ramen = commit --amend -C HEAD --reset-author
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 --all --prune
pff = pull --ff-only
# 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