mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 04:35:25 +02:00
git-cat-file: add page (#4492)
This commit is contained in:
parent
02f68ba74a
commit
53241532ce
1 changed files with 16 additions and 0 deletions
16
pages/common/git-cat-file.md
Normal file
16
pages/common/git-cat-file.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# git cat-file
|
||||
|
||||
> Provide content or type and size information for git repository objects.
|
||||
> More information: <https://git-scm.com/docs/git-cat-file>.
|
||||
|
||||
- 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}}`
|
Loading…
Add table
Reference in a new issue