Created
September 13, 2018 18:57
-
-
Save emperorcezar/62aeba58965b9744f1b50e62723dbea6 to your computer and use it in GitHub Desktop.
Open pull request url from command line on mac
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 | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BASE_URL=$(git config remote.origin.url | sed "s/git@\(.*\):\(.*\).git/https:\/\/\1\/\2/") | |
open ${BASE_URL}/compare/${BRANCH}?expand=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment