Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make a pull request from command line (OSX ready)
#!/bin/sh
# This will open a browser window with pull-request
set -e
project=`git remote -v | grep origin | head -n 1 | awk '{print $2}' | sed 's/.*github.com.//' | sed 's/\.git//'`
branch=`git rev-parse --abbrev-ref HEAD`
url="https://github.com/$project/compare/$branch?expand=1"
open $url
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.