GIT-CAT-FILE(1) Git Manual GIT-CAT-FILE(1) (NAME) git-cat-file - (SYNOPSIS) git cat-file git cat-file (-e | -p | -t | -s) git cat-file (--textconv | --filters) [: | --path= ] git cat-file (--batch | --batch-check | --batch-command) [--batch-all-objects] [--buffer] [--follow-symlinks] [--unordered] [--textconv | --filters] [-Z] (DESCRIPTION) (delta) . --batch . (non-batch) . (batch) . (OPTIONS) . << >> (SPECIFYING REVISIONS) gitrevisions(7) . -t . -s . --use-mailmap mailmap . -e . stderr . -p (pretty-print) . (dereference) . "tree" "blob" . --mailmap, --no-mailmap, --use-mailmap, --no-use-mailmap mailmap . git- shortlog(1). --textconv textconv . : : . --filters ( smudge ). : : . --filter=, --no-filter . . (--batch --batch-check) "filtered" . --batch-all-objects . : --filter=blob:none blob . --filter=blob:limit=[kmg] blob n . n . k m g KiB MiB GiB . blob:limit=1k blob:limit=1024 . --filter=object:type=(tag|commit|tree|blob) . --path= --textconv --filters blob . --batch, --batch= stdin. --textconv --filters --use-mailmap . o --textconv --filters . (BATCH OUTPUT) . o --use-mailmap mailmap . --batch-check, --batch-check= stdin. --textconv --filters --use-mailmap . o --textconv --filters . (BATCH OUTPUT) . o --use-mailmap mailmap . --batch-command, --batch-command= stdin . --buffer --textconv --use-mailmap --filters . o --textconv --filters . (BATCH OUTPUT) . o --use-mailmap contents mailmap info . --batch-command : contents . --batch . info . --batch-check . flush --buffer flush . --buffer flush . --buffer flush (flush) . mailmap () mailmap . git-config(1) . mailmap . --batch-all-objects stdin ( ). --batch --batch-check . --unordered . "replace" git-replace(1) . --buffer (flush) cat-file . stdio --batch-check --batch-command . --unordered --batch-all-objects . --batch. cat-file . --follow-symlinks --batch --batch-check SHA-1 tree-ish:path-in-tree . . tree-ish ( /foo ../foo) . ( ) ( :link HEAD:link) . ( ) --batch --batch-check . : f: a file containing "hello\n" link: a symlink to f dir/link: a symlink to ../f plink: a symlink to ../f alink: a symlink to /etc/passwd f echo HEAD:f | git cat-file --batch : ce013625030ba8dba906f756967f9e9ca394464a blob 6 echo HEAD:link | git cat-file --batch --follow-symlinks HEAD:dir/link HEAD:f . --follow-symlinks . HEAD:link : 4d1ae35ba2c8ec712fa2a379db44ad639ca277bd blob 1 plink alink : symlink 4 ../f symlink 11 /etc/passwd -Z --batch --batch-check --batch-command NUL . -z --batch --batch-check --batch-command NUL . -Z . (OUTPUT) -t . -s . -e . -p . ( ) . (BATCH OUTPUT) --batch --batch-check cat-file stdin . git-rev-parse(1) . --batch-command cat-file stdin . --batch-command info --batch-check contents --batch . . stdout %(atom) . : objectname . objecttype ( cat-file -t ). objectmode ( tree index) (octal) . . objectsize ( cat-file -s ). objectsize:disk . (CAVEATS) . deltabase . OID ( ) . (CAVEATS) . rest . ( "" ) %(rest) . %(objectname) %(objecttype) %(objectsize) . --batch --batch-command contents ( %(objectsize) ) . --batch : SP SP LF LF --batch-check='%(objectname) %(objecttype)' : SP LF stdin cat-file : SP missing LF stdin --filter= cat-file : SP excluded LF ( sha ) cat-file : SP ambiguous LF cat-file ( ): SP submodule LF --follow-symlinks cat-file : symlink SP LF LF ( / ) . dir/link ../../foo ../foo . . --follow-symlinks : SP missing LF . dangling SP LF LF ( ) . loop SP LF LF ( ) . notdir SP LF LF . -Z (line feeds) NUL . (parse) . (CAVEATS) . (non-delta) (repack) . . (GIT) git(1) Git 2.55.0 2026-06-29 GIT-CAT-FILE(1)