Created
May 16, 2013 15:55
-
-
Save jhafner/5592795 to your computer and use it in GitHub Desktop.
Open the current repo on Github. Script by Brian Edgerton.
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
#!/bin/bash | |
git_host='git@github.com:' | |
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
Also, I highly recommend the following in your .bash_profile: