Skip to content

Instantly share code, notes, and snippets.

Joshua Matthews iCurlmyster

Block or report user

Report or block iCurlmyster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iCurlmyster /
Last active Feb 7, 2018
convenient git show in bash
# allows user to git show by the number the commit appears in git log
# 1 is the first commit, 2 is the second, etc...
git_show() {
if ! [[ $1 =~ $re ]]; then
sha="$(git log -$1 --format="%H")"
shaSplit=(${sha//\n/ })
git show ${shaSplit[$(($1 - 1))]}
You can’t perform that action at this time.