-
-
Save jcxia43/098a524100c81ea5bb31f27c0d046166 to your computer and use it in GitHub Desktop.
Easily create GitHub PR in console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your PATH, and under any github repo, you can easily create a PR by
pr target_branch
.