blob: f56f16498398405a170c29543efc44a08e388c49 [file] [log] [blame]
Junio C Hamanod9d71c02006-02-08 00:52:331git-show(1)
2===========
3
4NAME
5----
Junio C Hamano7d23f5e2006-12-16 07:44:046git-show - Show various types of objects
Junio C Hamanod9d71c02006-02-08 00:52:337
8
9SYNOPSIS
10--------
Junio C Hamano7d23f5e2006-12-16 07:44:0411'git-show' [options] <object>...
Junio C Hamanod9d71c02006-02-08 00:52:3312
13DESCRIPTION
14-----------
Junio C Hamano7d23f5e2006-12-16 07:44:0415Shows one or more objects (blobs, trees, tags and commits).
16
17For commits it shows the log message and textual diff. It also
18presents the merge commit in a special format as produced by
19'git-diff-tree --cc'.
20
21For tags, it shows the tag message and the referenced objects.
22
23For trees, it shows the names (equivalent to gitlink:git-ls-tree[1]
24with \--name-only).
25
26For plain blobs, it shows the plain contents.
Junio C Hamanod9d71c02006-02-08 00:52:3327
Junio C Hamanod3339982007-02-09 08:38:4828The command takes options applicable to the gitlink:git-diff-tree[1] command to
29control how the changes the commit introduces are shown.
30
Junio C Hamanod9d71c02006-02-08 00:52:3331This manual page describes only the most frequently used options.
32
33
34OPTIONS
35-------
Junio C Hamano775a0f42006-12-31 01:19:1436<object>::
37The name of the object to show.
Junio C Hamano2d47c622007-01-18 06:24:1038For a more complete list of ways to spell object names, see
39"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
Junio C Hamanod9d71c02006-02-08 00:52:3340
Junio C Hamanoa340aaa2006-11-23 02:47:3341include::pretty-formats.txt[]
Junio C Hamanod9d71c02006-02-08 00:52:3342
Junio C Hamano7d23f5e2006-12-16 07:44:0443
44EXAMPLES
45--------
46
47git show v1.0.0::
Junio C Hamano775a0f42006-12-31 01:19:1448Shows the tag `v1.0.0`, along with the object the tags
49points at.
Junio C Hamano7d23f5e2006-12-16 07:44:0450
51git show v1.0.0^{tree}::
52Shows the tree pointed to by the tag `v1.0.0`.
53
54git show next~10:Documentation/README
55Shows the contents of the file `Documentation/README` as
56they were current in the 10th last commit of the branch
57`next`.
58
59git show master:Makefile master:t/Makefile
60Concatenates the contents of said Makefiles in the head
61of the branch `master`.
62
Junio C Hamano775a0f42006-12-31 01:19:1463Discussion
64----------
65
66include::i18n.txt[]
67
Junio C Hamanod9d71c02006-02-08 00:52:3368Author
69------
70Written by Linus Torvalds <torvalds@osdl.org> and
Junio C Hamano775a0f42006-12-31 01:19:1471Junio C Hamano <junkio@cox.net>. Significantly enhanced by
72Johannes Schindelin <Johannes.Schindelin@gmx.de>.
Junio C Hamanod9d71c02006-02-08 00:52:3373
74
75Documentation
76-------------
77Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.
78
79This manual page is a stub. You can help the git documentation by expanding it.
80
81GIT
82---
83Part of the gitlink:git[7] suite
84