Skip to content

Instantly share code, notes, and snippets.

@sameerkat
Created December 16, 2014 23:33
Show Gist options
  • Save sameerkat/b51351254dd6bd72fb41 to your computer and use it in GitHub Desktop.
Save sameerkat/b51351254dd6bd72fb41 to your computer and use it in GitHub Desktop.
Quickly create a Pull Request for your current branch
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
}
alias pr=pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment