From 53241532ce0bb38061d25d1f6d81ce450e75477e Mon Sep 17 00:00:00 2001 From: Howard Yun Date: Mon, 5 Oct 2020 10:55:53 -0400 Subject: [PATCH] git-cat-file: add page (#4492) --- pages/common/git-cat-file.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/git-cat-file.md diff --git a/pages/common/git-cat-file.md b/pages/common/git-cat-file.md new file mode 100644 index 0000000000..c734bb7d41 --- /dev/null +++ b/pages/common/git-cat-file.md @@ -0,0 +1,16 @@ +# git cat-file + +> Provide content or type and size information for git repository objects. +> More information: . + +- Get the [s]ize of the HEAD commit in bytes: + +`git cat-file -s HEAD` + +- Get the [t]ype (blob, tree, commit, tag) of a given git object: + +`git cat-file -t {{8c442dc3}}` + +- Pretty-[p]rint the contents of a given git object based on its type: + +`git cat-file -p {{HEAD~2}}`