Skip to content

Instantly share code, notes, and snippets.

@shiftkey
Created September 16, 2012 11:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiftkey/3732023 to your computer and use it in GitHub Desktop.
Save shiftkey/3732023 to your computer and use it in GitHub Desktop.
Sample .gitconfig with aliases for fun and profit
[alias]
st = status
co = checkout
ci = commit
br = branch
df = diff
lp = log -p
com = checkout master
fe = fetch origin
hr = reset origin/master --hard
me = config user.name
bn = !git for-each-ref --format='%(refname:short)' refs/heads/master
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
today = !git all --since='12am' --committer=\"`git me`\"
today-all = !git all --since='12am'
sync = !git update && git co master && git pull && git co @{-1}
resync = !sh -c 'BRANCH_NAME=master && git com && git fe && git hr && git rebase master '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment