git cat-file -p HEAD

Category: Git - Core

git cat-file -p HEAD

Print the raw content of a Git object

cat-file is the low-level tool for reading Git objects: -p pretty-prints, -t prints the type, and -s prints the size. Running it on HEAD shows the commit object with its tree, parents, and message. It is the plumbing behind many higher-level commands.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.