From 02937cecedd4b02151efce69ce45baa76b1a0286 Mon Sep 17 00:00:00 2001 From: Howard Yun Date: Sun, 4 Oct 2020 21:09:12 -0400 Subject: [PATCH 1/2] git-cat-file: add page --- 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 00000000000000..58f27ad6df5b3a --- /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}}` From 2beae8ac186179dfbc8c676147b391b1fccce180 Mon Sep 17 00:00:00 2001 From: Howard Yun Date: Sun, 4 Oct 2020 21:11:06 -0400 Subject: [PATCH 2/2] git-cat-file: fix command description --- pages/common/git-cat-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-cat-file.md b/pages/common/git-cat-file.md index 58f27ad6df5b3a..c734bb7d41fa7a 100644 --- a/pages/common/git-cat-file.md +++ b/pages/common/git-cat-file.md @@ -1,6 +1,6 @@ # git cat-file -> Provide content or type and size information for git repository objects +> Provide content or type and size information for git repository objects. > More information: . - Get the [s]ize of the HEAD commit in bytes: