Last active
August 29, 2015 14:03
-
-
Save wtfil/b555d7b8aee466674077 to your computer and use it in GitHub Desktop.
open page of current branch in browser
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
> ./open-remote.sh |
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
#!/bin/bash | |
BRANCH=`git rev-parse --abbrev-ref HEAD 2>/dev/null` | |
REMOTE=`git config --get remote.origin.url | sed -e 's/git@//' -e 's/.git//' -e 's/https:\/\///' -e 's/\:/\//'` | |
open https://$REMOTE/tree/$BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment