FahamLah

Commands

git cat-file (-t

git cat-file (-t | -s | -p) <object>

Risk: Safe

What it does

Shows one object from inside Git: a commit, tree, blob or tag.

When to use it

To see what a commit really stores.

Example

$ git cat-file -p HEAD

Print the newest commit: its tree, parent, author and message.

$ git cat-file -t HEAD^{tree}

Print the type of an object. Here it says tree.

$ git cat-file -s HEAD

Print the size of an object in bytes.