Created
June 26, 2019 09:17
-
-
Save SunRunAway/b37c239dd23f157ed328f177d67980c5 to your computer and use it in GitHub Desktop.
Use `git pr` to quickly send a pull request in browser.
This file contains 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
#!/bin/bash | |
# put this file in your $PATH | |
# and chmod +x git-pr | |
# then use `git pr` in one github repo | |
repo=`git remote -v | grep push | grep origin | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"` | |
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