Skip to content

Instantly share code, notes, and snippets.

@blacktaxi
Created May 13, 2013 13:01
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 blacktaxi/5568158 to your computer and use it in GitHub Desktop.
Save blacktaxi/5568158 to your computer and use it in GitHub Desktop.
My .gitconfig.
[color]
ui = true
[format]
pretty = oneline
[core]
autocrlf = true
[alias]
# basic stuff
st = status -s
s = status -s
co = checkout
ci = commit
cia = commit --amend
p = pull
pr = pull --rebase
a = add
ap = add -p
br = branch
b = branch
cp = cherry-pick
f = fetch
# logs
l = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short
lf = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short --follow # see changes through branches
ll = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short --numstat
la = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short --all
l- = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short --all --simplify-by-decoration
last = log -1 HEAD
bl = blame -w
lho = log --graph --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short HEAD..origin
s = show --pretty=format:"%C(yellow)%h\\ %C(cyan)%ad%C(yellow)%d\\ %C(reset)%s\\ %C(green)[%cn]" --decorate --date=short
conflicts = diff --name-only --diff-filter=U
dc = diff --cached # see staged changes
d = diff
rh = reset HEAD
rhh = reset --hard HEAD
uncommit = reset --soft HEAD~1 # undo last commit
unstage = reset
dumpstash = stash apply
stashstaged = stash save --keep-index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment