Created
April 16, 2011 14:50
-
-
Save rpetrich/923160 to your computer and use it in GitHub Desktop.
Pushes the local branch up to the origin and opens the github pull request form in the browser
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
#!/bin/sh | |
ORIGIN=$1 | |
if [ -e $1 ] ; then | |
ORIGIN=origin | |
fi | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
PROJECT=`git config --get remote.$ORIGIN.url | cut -f 2- -d : | cut -f 1 -d.` | |
git push $ORIGIN $BRANCH && open "https://github.com/$PROJECT/pull/new/$BRANCH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment