Skip to content

Instantly share code, notes, and snippets.

@smutch
Last active November 4, 2015 00:42
Show Gist options
  • Save smutch/ef40f9c8370b68f25d94 to your computer and use it in GitHub Desktop.
Save smutch/ef40f9c8370b68f25d94 to your computer and use it in GitHub Desktop.
My git aliases
[alias]
lg = log --graph --format='%Cred%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
standup = log --since '1 day ago' --oneline --author 'YOUR_EMAIL_HERE'
standup-week = log --since '7 day ago' --oneline --author 'YOUR_EMAIL_HERE'
latest = for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short) [%(committername)]'
b = branch
ba = branch -a
d = !git diff | view -
ds = diff --staged
co = checkout
nb = checkout -b
st = status
s = status -sb
c = commit
cv = commit --verbose
ca = commit -a
cav = commit -a --verbose
amend = commit --amend -C HEAD
undo = reset --sort HEAD^
stash-push = "!git stash > /dev/null && git stash apply > /dev/null"
sp = !git stash-push
[diff]
mnemonicprefix = true
tool = vimdiff
[color]
ui = auto
@smutch
Copy link
Author

smutch commented Nov 4, 2015

Almost all of this has been borrowed from various sources across the internet.

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