Merge master.kernel.org:/pub/scm/gitk/gitk
[git/git.git] / Documentation / git-cat-file.txt
1 git-cat-file(1)
2 ===============
3 v0.1, May 2005
4
5 NAME
6 ----
7 git-cat-file - Provide content or type information for repository objects
8
9
10 SYNOPSIS
11 --------
12 'git-cat-file' (-t | -s | <type>) <object>
13
14 DESCRIPTION
15 -----------
16 Provides content or type of objects in the repository. The type
17 is required unless '-t' is used to find the object type,
18 or '-s' is used to find the object size.
19
20 OPTIONS
21 -------
22 <object>::
23 The sha1 identifier of the object.
24
25 -t::
26 Instead of the content, show the object type identified by
27 <object>.
28
29 -s::
30 Instead of the content, show the object size identified by
31 <object>.
32
33 <type>::
34 Typically this matches the real type of <object> but asking
35 for a type that can trivially dereferenced from the given
36 <object> is also permitted. An example is to ask for a
37 "tree" with <object> being a commit object that contains it,
38 or to ask for a "blob" with <object> being a tag object that
39 points at it.
40
41 OUTPUT
42 ------
43 If '-t' is specified, one of the <type>. If '-s' is specified,
44 the size of the <object> in bytes.
45
46 Otherwise the raw (though uncompressed) contents of the <object> will
47 be returned.
48
49
50 Author
51 ------
52 Written by Linus Torvalds <torvalds@osdl.org>
53
54 Documentation
55 --------------
56 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
57
58 GIT
59 ---
60 Part of the link:git.html[git] suite
61