1GIT-CAT-FILE(1) Git Manual GIT-CAT-FILE(1)
2
3
4
6 git-cat-file - Provide content or type/size information for repository
7 objects
8
10 git-cat-file [-t | -s | -e | -p | <type>] <object>
11
13 Provides content or type of objects in the repository. The type is
14 required unless -t or -p is used to find the object type, or -s is used
15 to find the object size.
16
18 <object>
19 The name of the object to show. For a more complete list of ways to
20 spell object names, see "SPECIFYING REVISIONS" section in git-rev-
21 parse(1).
22
23 -t
24 Instead of the content, show the object type identified by
25 <object>.
26
27 -s
28 Instead of the content, show the object size identified by
29 <object>.
30
31 -e
32 Suppress all output; instead exit with zero status if <object>
33 exists and is a valid object.
34
35 -p
36 Pretty-print the contents of <object> based on its type.
37
38 <type>
39 Typically this matches the real type of <object> but asking for a
40 type that can trivially be dereferenced from the given <object> is
41 also permitted. An example is to ask for a "tree" with <object>
42 being a commit object that contains it, or to ask for a "blob" with
43 <object> being a tag object that points at it.
44
46 If -t is specified, one of the <type>.
47
48 If -s is specified, the size of the <object> in bytes.
49
50 If -e is specified, no output.
51
52 If -p is specified, the contents of <object> are pretty-printed.
53
54 Otherwise the raw (though uncompressed) contents of the <object> will
55 be returned.
56
58 Written by Linus Torvalds <torvalds@osdl.org>
59
61 Documentation by David Greaves, Junio C Hamano and the git-list
62 <git@vger.kernel.org>.
63
65 Part of the git(7) suite
66
67
68
69
70Git 1.5.3.3 10/09/2007 GIT-CAT-FILE(1)