Created
February 10, 2012 06:33
-
-
Save wm/1787204 to your computer and use it in GitHub Desktop.
Pull request from the command line
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
gh_info=`gh info` | |
repo_user=`echo ${gh_info}|grep 'You are'|sed 's/You are //g'` | |
repo_name=`echo ${gh_info}|grep '== Info for'|sed 's/== Info for //g'` | |
branch_name=`git branch|grep '\*'|sed 's/\* //g'` | |
pull_url="https://github.com/${repo_user}/${repo_name}/pull/new/${branch_name}" | |
git fetch origin && git rebase origin/master && open ${pull_url} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment