Created
February 7, 2013 10:36
-
-
Save roc/4730161 to your computer and use it in GitHub Desktop.
Pushups and Pullups for your bash, because gym metaphors work really well with git wrangling.
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
# should return current branch | |
function current_branch() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(git rev-parse --short HEAD 2> /dev/null) || return | |
echo ${ref#refs/heads/} | |
} | |
alias pullup='git pull origin $(current_branch)' | |
alias pushup='git push origin $(current_branch)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment