Created
February 22, 2013 06:19
-
-
Save BaseCase/5011141 to your computer and use it in GitHub Desktop.
This script will open up the GitHub page in your web browser for the current git repo in your shell. It's aliased to 'gho' (GitHub Open) in my bash config. Change "github" on line 4 to whatever your GitHub remote is named (default is "origin").
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 | |
| function github { | |
| git remote show -n github | | |
| grep Fetch | | |
| cut -d @ -f 2 | | |
| tr ':' '/' | | |
| sed s/\.git// | | |
| sed s#^#https://# | |
| } | |
| open `github` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment