Skip to content

Instantly share code, notes, and snippets.

@gwillem
Last active August 24, 2016 16:03
Show Gist options
  • Save gwillem/98b2ade3d094ffa2a4f6 to your computer and use it in GitHub Desktop.
Save gwillem/98b2ade3d094ffa2a4f6 to your computer and use it in GitHub Desktop.
My .gitconfig
[alias]
c = commit -m
a = add
aa= !git add -u && git add . && git status
cb = checkout -b
up = !git fetch origin && git rebase origin/master
ir = !git rebase -i origin/master
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && rake && git push
p = pull --rebase --verbose --stat --prune
po = !git push -u origin $(git describe --contains --all HEAD)
lol = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %an: %s %Cgreen(%cr)'
lola = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %an: %s %Cgreen(%cr)' --all
ign = ls-files -o -i --exclude-standard
ls = ls-files
unstage = reset HEAD
dm = !git checkout master && git branch --merged | grep -v '^\\*' | xargs -r -n 1 git branch -d
@allardhoeve
Copy link

Only works with recent git that has %C(auto). Shouldn't be a problem, but if you run into it, use %C(yellow).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment