Skip to content

Instantly share code, notes, and snippets.

@tsabat
Created June 7, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsabat/f5185b3a96f6a82f0def33618d7606b1 to your computer and use it in GitHub Desktop.
Save tsabat/f5185b3a96f6a82f0def33618d7606b1 to your computer and use it in GitHub Desktop.
function 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