Skip to content

Instantly share code, notes, and snippets.

@heytrav
Created April 9, 2013 01:31
Show Gist options
  • Save heytrav/5342178 to your computer and use it in GitHub Desktop.
Save heytrav/5342178 to your computer and use it in GitHub Desktop.
[alias]
co = checkout
br = branch
sb = show-branch --current --color
ci = commit -v
hist = log --pretty=format:\"%C(cyan)%h%Creset %Cgreen%ad%Creset | %C(yellow)%s%d%Creset [%C(white)%an%Creset]\" --graph --date=short
who = shortlog -s --
dump = cat-file -p
ri = rebase --interactive
smf = submodule foreach git fetch --all
heads = log --pretty=format:\"%C(cyan)%h%Creset %C(blue)%d%Creset\" --graph
st = status
gitkconflict = !gitk --left-right HEAD...MERGE_HEAD
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
mb = merge-base HEAD
mbi = show-branch --merge-base
diverged = "!f() { git hist HEAD $@ --not $(git mb $@)^; }; f"
commontag = "!f() { git describe --tags $(git mb $@); }; f"
treetag = "!f() { git hist HEAD $@ --not $(git commontag $@)^; }; f"
prune-all = "!git remote | xargs -n 1 git remote prune"
stripped-branch = "!f() { git br --column=row $@ ; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment