Skip to content

Instantly share code, notes, and snippets.

@marioBonales
Created October 3, 2011 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marioBonales/1259940 to your computer and use it in GitHub Desktop.
Save marioBonales/1259940 to your computer and use it in GitHub Desktop.
#!/bin/sh
extra=""
if [[ "$1" != "" ]]; then
revnumber=$(git rev-parse $1)
extra="/commit/$revnumber"
fi
open `git config -l | sed -En 's/remote.origin.url=git(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\3\/\4/p'`$extra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment