blob: 5e9cbf875d72ae4a537467197ddde98dbec3cf3b [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-cat-file(1)
2===============
3
4NAME
5----
6git-cat-file - Provide content or type information for repository objects
7
8
9SYNOPSIS
10--------
Junio C Hamano8eb323c2006-05-25 05:55:2211'git-cat-file' [-t | -s | -e | -p | <type>] <object>
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
15Provides content or type of objects in the repository. The type
Junio C Hamano8eb323c2006-05-25 05:55:2216is required unless '-t' or '-p' is used to find the object type,
Junio C Hamano1a4e8412005-12-27 08:17:2317or '-s' is used to find the object size.
18
19OPTIONS
20-------
21<object>::
22The sha1 identifier of the object.
23
24-t::
25Instead of the content, show the object type identified by
26<object>.
27
28-s::
29Instead of the content, show the object size identified by
30<object>.
31
32-e::
33Suppress all output; instead exit with zero status if <object>
34exists and is a valid object.
35
Junio C Hamano8eb323c2006-05-25 05:55:2236-p::
37Pretty-print the contents of <object> based on its type.
38
Junio C Hamano1a4e8412005-12-27 08:17:2339<type>::
40Typically this matches the real type of <object> but asking
41for a type that can trivially be dereferenced from the given
42<object> is also permitted. An example is to ask for a
43"tree" with <object> being a commit object that contains it,
44or to ask for a "blob" with <object> being a tag object that
45points at it.
46
47OUTPUT
48------
49If '-t' is specified, one of the <type>.
50
51If '-s' is specified, the size of the <object> in bytes.
52
53If '-e' is specified, no output.
54
Junio C Hamano8eb323c2006-05-25 05:55:2255If '-p' is specified, the contents of <object> are pretty-printed.
56
Junio C Hamano1a4e8412005-12-27 08:17:2357Otherwise the raw (though uncompressed) contents of the <object> will
58be returned.
59
60
61Author
62------
63Written by Linus Torvalds <torvalds@osdl.org>
64
65Documentation
66--------------
67Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
68
69GIT
70---
71Part of the gitlink:git[7] suite
72