Skip to content

Instantly share code, notes, and snippets.

@rxgx
Created April 19, 2017 17:05
Show Gist options
  • Save rxgx/d2c01b1ca6b438cab7962a9d6ace413a to your computer and use it in GitHub Desktop.
Save rxgx/d2c01b1ca6b438cab7962a9d6ace413a to your computer and use it in GitHub Desktop.
Pull Request Script
# Open browser and submit PR for current branch against master
pr () {
local repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.github.com[:/]\(.*/)\.git.*/\1/"`
local branch=`git name-rev --name-only HEAD`
echo "... creating pull request for branch \"$branch\" in \"$repo\""
open https://github.com/$repo/pull/new/$branch
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment