Created
March 21, 2013 17:51
-
-
Save tbjers/5215096 to your computer and use it in GitHub Desktop.
git aliases I cannot live without...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
sync = !sh -c 'git pull && git diff --quiet HEAD || (git commit $1 && git push)' - | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; sublime_text `f`" | |
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`" | |
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
who = shortlog -s -- | |
new = !sh -c 'git lg $1@{1}..$1@{0} "$@"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment