]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-cat-file.txt
Merge branch 'jc/pack-reuse'
[thirdparty/git.git] / Documentation / git-cat-file.txt
CommitLineData
2cf565c5
DG
1git-cat-file(1)
2===============
2cf565c5
DG
3
4NAME
5----
6git-cat-file - Provide content or type information for repository objects
7
8
9SYNOPSIS
10--------
353ce815 11'git-cat-file' [-t | -s | -e | <type>] <object>
2cf565c5
DG
12
13DESCRIPTION
14-----------
15Provides content or type of objects in the repository. The type
62bb9960
JH
16is required unless '-t' is used to find the object type,
17or '-s' is used to find the object size.
2cf565c5
DG
18
19OPTIONS
20-------
21<object>::
22 The sha1 identifier of the object.
23
24-t::
25 Instead of the content, show the object type identified by
26 <object>.
27
62bb9960
JH
28-s::
29 Instead of the content, show the object size identified by
30 <object>.
31
7950571a
PA
32-e::
33 Suppress all output; instead exit with zero status if <object>
34 exists and is a valid object.
35
2cf565c5
DG
36<type>::
37 Typically this matches the real type of <object> but asking
f73ae1fc 38 for a type that can trivially be dereferenced from the given
2cf565c5
DG
39 <object> is also permitted. An example is to ask for a
40 "tree" with <object> being a commit object that contains it,
41 or to ask for a "blob" with <object> being a tag object that
42 points at it.
43
44OUTPUT
45------
7950571a
PA
46If '-t' is specified, one of the <type>.
47
48If '-s' is specified, the size of the <object> in bytes.
49
50If '-e' is specified, no output.
2cf565c5
DG
51
52Otherwise the raw (though uncompressed) contents of the <object> will
53be returned.
54
55
56Author
57------
58Written by Linus Torvalds <torvalds@osdl.org>
59
60Documentation
61--------------
62Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
63
64GIT
65---
a7154e91 66Part of the gitlink:git[7] suite
2cf565c5 67