Created
September 27, 2010 12:08
-
-
Save fsouza/598919 to your computer and use it in GitHub Desktop.
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
# Push git changes. $1 = destination branch | |
function git_push() { | |
typeset current_branch=$(parse_git_branch) | |
typeset destination_branch="$1" | |
if [ "$destination_branch" = "" ] | |
then | |
typeset destination_branch="master" | |
fi | |
git checkout $destination_branch; git merge $current_branch; git pull origin $destination_branch; git push origin $destination_branch; git checkout $current_branch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment