Open GitHub to a specific commit
Here's a zsh function that uses [hub][1] to open your browser to show a specific commit on github.
function commit
{
repo=$(git remote show origin -n | grep "Fetch URL" | sed 's/.*:\(.*\)\.git/\1/')
hub browse $repo commit/$1
}
Invoke it like this, from inside a git-managed directory :
$ commit 4a8c4f889b
Written by Lorin Hochstein
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Zsh
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#