Skip to content

Instantly share code, notes, and snippets.

@incanus
Created February 2, 2011 18:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save incanus/808151 to your computer and use it in GitHub Desktop.
Save incanus/808151 to your computer and use it in GitHub Desktop.
This is a shell script to open the current Git repository on GitHub in the default browser. Only works at the top level of the working copy and on Mac OS X (for now).
grep github ./.git/config | sed -e 's/^.*\(github.com.*\)\.git$/\1/' -e 's/.*github\.com:*\/*/https:\/\/github.com\//' | xargs open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment