blob: 5eb67439affbef1a7fccb6a745220977b6a0a45d [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 Hamano2b1164d2023-09-29 16:43:2929Some options that 'git log' command understands can be used 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 Hamano8c860d62021-02-06 01:37:4748DIFF FORMATTING
49---------------
50The options below can be used to change the way `git show` generates
51diff output.
Junio C Hamano58f587a2013-07-22 19:20:5952
53:git-log: 1
Junio C Hamano8c860d62021-02-06 01:37:4754:diff-merges-default: `dense-combined`
Junio C Hamano58f587a2013-07-22 19:20:5955include::diff-options.txt[]
56
57include::diff-generate-patch.txt[]
58
59
Junio C Hamano7d23f5e2006-12-16 07:44:0460EXAMPLES
61--------
62
Junio C Hamano16ebcd02011-08-05 00:05:4563`git show v1.0.0`::
Junio C Hamano33be8212023-10-23 21:45:5464Shows the tag `v1.0.0`, along with the object the tag
Junio C Hamano775a0f42006-12-31 01:19:1465points at.
Junio C Hamano7d23f5e2006-12-16 07:44:0466
Junio C Hamanob76a6862012-05-02 22:02:4667`git show v1.0.0^{tree}`::
Junio C Hamano7d23f5e2006-12-16 07:44:0468Shows the tree pointed to by the tag `v1.0.0`.
69
Junio C Hamanob76a6862012-05-02 22:02:4670`git show -s --format=%s v1.0.0^{commit}`::
Junio C Hamanoc3fda572010-11-09 19:41:3071Shows the subject of the commit pointed to by the
72tag `v1.0.0`.
73
Junio C Hamano16ebcd02011-08-05 00:05:4574`git show next~10:Documentation/README`::
Junio C Hamano7d23f5e2006-12-16 07:44:0475Shows the contents of the file `Documentation/README` as
76they were current in the 10th last commit of the branch
77`next`.
78
Junio C Hamano16ebcd02011-08-05 00:05:4579`git show master:Makefile master:t/Makefile`::
Junio C Hamano7d23f5e2006-12-16 07:44:0480Concatenates the contents of said Makefiles in the head
81of the branch `master`.
82
Junio C Hamanob9d9d902018-05-23 07:07:4283DISCUSSION
Junio C Hamano775a0f42006-12-31 01:19:1484----------
85
86include::i18n.txt[]
87
Junio C Hamanod9d71c02006-02-08 00:52:3388GIT
89---
Junio C Hamanof7c042d2008-06-06 22:50:5390Part of the linkgit:git[1] suite