Skip to content

Instantly share code, notes, and snippets.

@philk
Created January 10, 2012 21:28
Show Gist options
  • Select an option

  • Save philk/1591306 to your computer and use it in GitHub Desktop.

Select an option

Save philk/1591306 to your computer and use it in GitHub Desktop.
git pull request
function git_current_branch() {
git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///'
}
function git_current_origin() {
git config --get remote.origin.url | sed -e 's/^.*\://' | sed -e 's/\.git.*//'
}
alias gpr='open "https://github.com/$(git_current_origin)/pull/new/$(git_current_branch)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment