Created
May 21, 2015 20:48
-
-
Save kraigh/2d3ff09b37dfdf0669cc to your computer and use it in GitHub Desktop.
github pull request helper
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 bash | |
branch=$(git symbolic-ref --short HEAD) | |
remote=$(git config --get remote.origin.url) | |
url=${remote/git\@github\.com\:/https://github.com/} | |
url=${url/\.git/\/compare/} | |
base= | |
while getopts b: opt; do | |
case $opt in | |
b) | |
base="$OPTARG..." | |
;; | |
esac | |
done | |
url=$url$base$branch | |
open $url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment