blob: ae4edcccfbc2c862f4a1f77a5d58c348fbee2def [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 Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanofce7c7e2008-07-02 03:06:3812'git show' [options] <object>...
Junio C Hamanod9d71c02006-02-08 00:52:3313
14DESCRIPTION
15-----------
Junio C Hamano7d23f5e2006-12-16 07:44:0416Shows one or more objects (blobs, trees, tags and commits).
17
18For commits it shows the log message and textual diff. It also
19presents the merge commit in a special format as produced by
Junio C Hamano1aa40d22010-01-21 17:46:4320'git diff-tree --cc'.
Junio C Hamano7d23f5e2006-12-16 07:44:0421
22For tags, it shows the tag message and the referenced objects.
23
Junio C Hamano1aa40d22010-01-21 17:46:4324For trees, it shows the names (equivalent to 'git ls-tree'
Junio C Hamano7d23f5e2006-12-16 07:44:0425with \--name-only).
26
27For plain blobs, it shows the plain contents.
Junio C Hamanod9d71c02006-02-08 00:52:3328
Junio C Hamano1aa40d22010-01-21 17:46:4329The command takes options applicable to the 'git diff-tree' command to
Junio C Hamanod3339982007-02-09 08:38:4830control how the changes the commit introduces are shown.
31
Junio C Hamanod9d71c02006-02-08 00:52:3332This manual page describes only the most frequently used options.
33
34
35OPTIONS
36-------
Junio C Hamano9e395072008-07-31 22:11:2137<object>...::
38The names of objects to show.
Junio C Hamano2d47c622007-01-18 06:24:1039For a more complete list of ways to spell object names, see
Junio C Hamanoc27b7332010-10-14 04:37:2840"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
Junio C Hamanod9d71c02006-02-08 00:52:3341
Junio C Hamano0430e3a2007-05-15 03:13:1742include::pretty-options.txt[]
43
44
Junio C Hamanoa340aaa2006-11-23 02:47:3345include::pretty-formats.txt[]
Junio C Hamanod9d71c02006-02-08 00:52:3346
Junio C Hamano7d23f5e2006-12-16 07:44:0447
48EXAMPLES
49--------
50
Junio C Hamano16ebcd02011-08-05 00:05:4551`git show v1.0.0`::
Junio C Hamano775a0f42006-12-31 01:19:1452Shows the tag `v1.0.0`, along with the object the tags
53points at.
Junio C Hamano7d23f5e2006-12-16 07:44:0454
Junio C Hamanob76a6862012-05-02 22:02:4655`git show v1.0.0^{tree}`::
Junio C Hamano7d23f5e2006-12-16 07:44:0456Shows the tree pointed to by the tag `v1.0.0`.
57
Junio C Hamanob76a6862012-05-02 22:02:4658`git show -s --format=%s v1.0.0^{commit}`::
Junio C Hamanoc3fda572010-11-09 19:41:3059Shows the subject of the commit pointed to by the
60tag `v1.0.0`.
61
Junio C Hamano16ebcd02011-08-05 00:05:4562`git show next~10:Documentation/README`::
Junio C Hamano7d23f5e2006-12-16 07:44:0463Shows the contents of the file `Documentation/README` as
64they were current in the 10th last commit of the branch
65`next`.
66
Junio C Hamano16ebcd02011-08-05 00:05:4567`git show master:Makefile master:t/Makefile`::
Junio C Hamano7d23f5e2006-12-16 07:44:0468Concatenates the contents of said Makefiles in the head
69of the branch `master`.
70
Junio C Hamano775a0f42006-12-31 01:19:1471Discussion
72----------
73
74include::i18n.txt[]
75
Junio C Hamanod9d71c02006-02-08 00:52:3376GIT
77---
Junio C Hamanof7c042d2008-06-06 22:50:5378Part of the linkgit:git[1] suite