Last active
October 27, 2015 17:55
-
-
Save starkcoffee/402ca19b5b25e9f56b16 to your computer and use it in GitHub Desktop.
Git aliases
This file contains hidden or 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 | |
ca = commit -am | |
co = checkout | |
branch-name = !git branch 2>/dev/null | grep -e ^* | tr -d '* ' | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
compare = !"open https://github.com/soundcloud/`echo ${PWD##*/}`/compare/`git branch-name`" | |
implode = !"BN=`git branch-name` && [ $BN != 'master' ] && git co master && git branch -D $BN && git push origin :$BN" | |
un = !git status --porcelain | grep '??' | awk '{ print $2}' | |
corb = !git checkout -t |
the compare only works in my soundcloud organization. needs to be generified.
here my updates, using hub (brew install hub
) to get compare
working everyhere
branch-name = symbolic-ref --short HEAD
compare = !hub compare `git branch-name`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ripped from @rngtng