Created
April 6, 2009 20:36
-
-
Save 13k/90928 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
#!/bin/sh | |
# Pushes current branch to remote branch possibly with different names | |
# With no arguments, pushes to origin +<branch>:<branch> where <branch> | |
# is the same branch name as current. | |
# With one argument, pushes to origin +<branch>:<argument> | |
head=`git symbolic-ref HEAD` | |
branch=`basename $head` | |
git push origin +$branch:${1:-$branch} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment