Last active
October 26, 2017 17:23
-
-
Save n8gray/3582d6ae464e06203eebc1a7659f3313 to your computer and use it in GitHub Desktop.
Git: Show the details of a commit and all its parents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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