[フレーム]
Last Updated: February 25, 2016
·
576
· Lorin Hochstein

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

[1]: https://github.com/github/hub

AltStyle によって変換されたページ (->オリジナル) /