Created
July 9, 2014 20:40
-
-
Save andyvanee/20304060c56c2da56e4b to your computer and use it in GitHub Desktop.
Alias to open the first github.com remote from the current directory in a 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
github(){ | |
open `git remote -v | grep github.com | head -n 1 | cut -f 2 | cut -d' ' -f 1 | sed 's/git@/http:\/\//' | sed 's/.git$//' | sed 's/github.com:/github.com\//'` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment