In brief
git cat-file exposes Git object information. -t shows the type, -s the size, and -p a suitable readable representation.
Useful to know
git cat-file exposes Git object information. -t shows the type, -s the size, and -p a suitable readable representation. [1]
This helps diagnostics and tools handling object identifiers. A branch name, commit and file blob are different things. Establish the expected object type before automatically interpreting every returned text as file contents.
Sources
For further detail and to check the information: