Skip to content

Instantly share code, notes, and snippets.

@n8gray

n8gray/git-details

Last active Oct 26, 2017
Embed
What would you like to do?
Git: Show the details of a commit and all its parents
#!/bin/zsh
#
# Shows the raw details of a commit and all its parents
#
if [[ $# < 1 ]]; then
SHA=HEAD
else
SHA=$1
fi
for HASH in `git rev-list --parents -n 1 $SHA`; do
git log -n 1 --format=raw $HASH | cat
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.