Created
May 7, 2019 18:16
-
-
Save doyle/7b080340a95194c9c52ba136427a5468 to your computer and use it in GitHub Desktop.
Pushes the current branch to git hub and opens the PR in your 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/sh | |
# pushes the current branch to git hub and opens your browser to the | |
# pull request page for the current branch | |
OUTPUT=`(git push origin HEAD) 2>&1` | |
URL=`echo $OUTPUT | sed -e 's/.*visiting: remote: \(https:\/\/github.com[A-Za-z0-9%\/_-]*\).*/\1/'` | |
echo opening $URL | |
open $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment