Created
September 28, 2012 07:57
-
-
Save dindinw/3798534 to your computer and use it in GitHub Desktop.
cat all git objects under .git/objects folder
This file contains 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
# git_cat : cat all git objects | |
# find .git/objects/ -type f|cut -c14-15,17-20|xargs -I {} sh -c "echo '\nFor {}:' ; git cat-file -p {}" | |
function git_cat (){ | |
for o in $(find .git/objects/ -type f|cut -c14-15,17-20); do | |
echo $(tput bold) $o \($(tput setaf 1) $(git cat-file -t $o)$(tput sgr0)$(tput bold) \):$(tput sgr0) | |
git cat-file -p $o | |
done; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment