Skip to content

Instantly share code, notes, and snippets.

@lennart
Created February 2, 2012 22:13
Show Gist options
  • Save lennart/1726132 to your computer and use it in GitHub Desktop.
Save lennart/1726132 to your computer and use it in GitHub Desktop.
Sample .gitconfig
[alias]
co = checkout
st = status -sb
pl = pull
pu = push
push = !sh -c 'git push --tags && git push'
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lg = log --oneline --decorate
ci = commit
ai = add --interactive
a = commit --amend
br = branch
di = diff --word-diff --function-context
dc = diff --word-diff --cached --function-context
ad = add
ap = add --patch
fix = stash --keep-index --include-untracked
c = commit -m
wc = whatchanged --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
github-submodule = !sh -c 'git submodule add git://github.com/$0/$1.git vendor/plugins/$1'
[color]
ui = true
diff = auto
status = auto
branch = auto
[core]
editor = subl -w
autocrlf = input
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s
[push]
default = current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment