Skip to content

Instantly share code, notes, and snippets.

@tommymarshall tommymarshall/.zshrc
Created Jan 29, 2018

Embed
What would you like to do?
Create a PR against master from your the branch you're in, and open it in the browser.
pr () {
local repo=`git remote -v | grep -m 1 "origin" | 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
You can’t perform that action at this time.