Skip to content

Instantly share code, notes, and snippets.

@jcxia43
Last active December 22, 2016 13:03
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 jcxia43/098a524100c81ea5bb31f27c0d046166 to your computer and use it in GitHub Desktop.
Save jcxia43/098a524100c81ea5bb31f27c0d046166 to your computer and use it in GitHub Desktop.
Easily create GitHub PR in console
#!/usr/bin/env ruby
repo = `git remote show origin -n | grep h.URL | sed 's/.*://;s/.git$//'`.strip
branch = `git rev-parse --abbrev-ref HEAD`
`open https://www.github.com/#{repo}/compare/#{ARGV[0]}...#{branch}`
@jcxia43
Copy link
Author

jcxia43 commented Dec 22, 2016

Add this to your PATH, and under any github repo, you can easily create a PR by pr target_branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment