6 git-cat-file - Provide content or type/size information for repository objects
12 'git-cat-file' [-t | -s | -e | -p | <type>] <object>
13 'git-cat-file' [--batch | --batch-check] < <list-of-objects>
17 In the first form, provides content or type of objects in the repository. The
18 type is required unless '-t' or '-p' is used to find the object type, or '-s'
19 is used to find the object size.
21 In the second form, a list of object (separated by LFs) is provided on stdin,
22 and the SHA1, type, and size of each object is printed on stdout.
27 The name of the object to show.
28 For a more complete list of ways to spell object names, see
29 "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
32 Instead of the content, show the object type identified by
36 Instead of the content, show the object size identified by
40 Suppress all output; instead exit with zero status if <object>
41 exists and is a valid object.
44 Pretty-print the contents of <object> based on its type.
47 Typically this matches the real type of <object> but asking
48 for a type that can trivially be dereferenced from the given
49 <object> is also permitted. An example is to ask for a
50 "tree" with <object> being a commit object that contains it,
51 or to ask for a "blob" with <object> being a tag object that
55 Print the SHA1, type, size, and contents of each object provided on
56 stdin. May not be combined with any other options or arguments.
59 Print the SHA1, type, and size of each object provided on stdin. May not be
60 combined with any other options or arguments.
64 If '-t' is specified, one of the <type>.
66 If '-s' is specified, the size of the <object> in bytes.
68 If '-e' is specified, no output.
70 If '-p' is specified, the contents of <object> are pretty-printed.
72 If <type> is specified, the raw (though uncompressed) contents of the <object>
75 If '--batch' is specified, output of the following form is printed for each
76 object specified on stdin:
79 <sha1> SP <type> SP <size> LF
83 If '--batch-check' is specified, output of the following form is printed for
84 each object specified fon stdin:
87 <sha1> SP <type> SP <size> LF
90 For both '--batch' and '--batch-check', output of the following form is printed
91 for each object specified on stdin that does not exist in the repository:
94 <object> SP missing LF
99 Written by Linus Torvalds <torvalds@osdl.org>
103 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
107 Part of the linkgit:git[1] suite