Pretty-[p]rint the contents of a given Git object based on its type

git cat-file

  • Provide content or type and size information for Git repository objects.
    More information: <https://git-scm.com/docs/git-cat-file>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git cat-file -p {{HEAD~2}}

click the source code to copy install git cat-file on any operating system with command-not-found.com