Last active
June 7, 2018 01:21
-
-
Save stilliard/7734f83d63dfcb08021a22522b60d14e to your computer and use it in GitHub Desktop.
git alias to show link to create or view pull request for current branch
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
pr = "!f() { git remote get-url origin | sed 's/[email protected]://g' | sed 's/.git//g' | awk '{print \"https://github.com/\"$1\"/pull/'$(git rev-parse --abbrev-ref HEAD)'\"}'; }; f" |
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
pr = "!f() { exo-open $(git remote get-url origin | sed 's/[email protected]://g' | sed 's/.git//g' | awk '{print \"https://github.com/\"$1\"/pull/'$(git rev-parse --abbrev-ref HEAD)'\"}'); }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment