-
-
Save kublaj/54f74a7fd7061e4eb235534f3fa71b28 to your computer and use it in GitHub Desktop.
Open the current repo on Github. Script by Brian Edgerton.
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 | |
| git_host='[email protected]:' | |
| git_url='https://github.com/' | |
| remote=`git config --get remote.origin.url` | |
| host=${remote:0:15} | |
| if [ $host = $git_host ] | |
| then | |
| url=${remote/$git_host/$git_url} | |
| open $url | |
| else | |
| echo "Repo does not have a Github origin" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment