blob: fcf528c1b30d8045592d117ccc3d5f9248d0edbd [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 Hamanoc9cb5172018-06-01 07:13:4412'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 Hamano1dbca522015-05-22 20:48:5525with --name-only).
Junio C Hamano7d23f5e2006-12-16 07:44:0426
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>...::
Junio C Hamano640779d2018-02-14 01:29:1438The names of objects to show (defaults to 'HEAD').
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
Junio C Hamano58f587a2013-07-22 19:20:5948COMMON DIFF OPTIONS
49-------------------
50
51:git-log: 1
52include::diff-options.txt[]
53
54include::diff-generate-patch.txt[]
55
56
Junio C Hamano7d23f5e2006-12-16 07:44:0457EXAMPLES
58--------
59
Junio C Hamano16ebcd02011-08-05 00:05:4560`git show v1.0.0`::
Junio C Hamano775a0f42006-12-31 01:19:1461Shows the tag `v1.0.0`, along with the object the tags
62points at.
Junio C Hamano7d23f5e2006-12-16 07:44:0463
Junio C Hamanob76a6862012-05-02 22:02:4664`git show v1.0.0^{tree}`::
Junio C Hamano7d23f5e2006-12-16 07:44:0465Shows the tree pointed to by the tag `v1.0.0`.
66
Junio C Hamanob76a6862012-05-02 22:02:4667`git show -s --format=%s v1.0.0^{commit}`::
Junio C Hamanoc3fda572010-11-09 19:41:3068Shows the subject of the commit pointed to by the
69tag `v1.0.0`.
70
Junio C Hamano16ebcd02011-08-05 00:05:4571`git show next~10:Documentation/README`::
Junio C Hamano7d23f5e2006-12-16 07:44:0472Shows the contents of the file `Documentation/README` as
73they were current in the 10th last commit of the branch
74`next`.
75
Junio C Hamano16ebcd02011-08-05 00:05:4576`git show master:Makefile master:t/Makefile`::
Junio C Hamano7d23f5e2006-12-16 07:44:0477Concatenates the contents of said Makefiles in the head
78of the branch `master`.
79
Junio C Hamanob9d9d902018-05-23 07:07:4280DISCUSSION
Junio C Hamano775a0f42006-12-31 01:19:1481----------
82
83include::i18n.txt[]
84
Junio C Hamanod9d71c02006-02-08 00:52:3385GIT
86---
Junio C Hamanof7c042d2008-06-06 22:50:5387Part of the linkgit:git[1] suite