blob: f0a8a1aff3694cf00587d8670a8fe9962fe98af3 [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 Hamanofce7c7e2008-07-02 03:06:3811'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
Junio C Hamano1aa40d22010-01-21 17:46:4319'git diff-tree --cc'.
Junio C Hamano7d23f5e2006-12-16 07:44:0420
21For tags, it shows the tag message and the referenced objects.
22
Junio C Hamano1aa40d22010-01-21 17:46:4323For trees, it shows the names (equivalent to 'git ls-tree'
Junio C Hamano7d23f5e2006-12-16 07:44:0424with \--name-only).
25
26For plain blobs, it shows the plain contents.
Junio C Hamanod9d71c02006-02-08 00:52:3327
Junio C Hamano1aa40d22010-01-21 17:46:4328The command takes options applicable to the 'git diff-tree' command to
Junio C Hamanod3339982007-02-09 08:38:4829control 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 Hamano9e395072008-07-31 22:11:2136<object>...::
37The names of objects to show.
Junio C Hamano2d47c622007-01-18 06:24:1038For a more complete list of ways to spell object names, see
Junio C Hamanoc27b7332010-10-14 04:37:2839"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
Junio C Hamanod9d71c02006-02-08 00:52:3340
Junio C Hamano0430e3a2007-05-15 03:13:1741include::pretty-options.txt[]
42
43
Junio C Hamanoa340aaa2006-11-23 02:47:3344include::pretty-formats.txt[]
Junio C Hamanod9d71c02006-02-08 00:52:3345
Junio C Hamano7d23f5e2006-12-16 07:44:0446
47EXAMPLES
48--------
49
50git show v1.0.0::
Junio C Hamano775a0f42006-12-31 01:19:1451Shows the tag `v1.0.0`, along with the object the tags
52points at.
Junio C Hamano7d23f5e2006-12-16 07:44:0453
Junio C Hamanodb911ee2007-02-28 08:13:5254git show v1.0.0^\{tree\}::
Junio C Hamano7d23f5e2006-12-16 07:44:0455Shows the tree pointed to by the tag `v1.0.0`.
56
Junio C Hamanoc3fda572010-11-09 19:41:3057git show -s --format=%s v1.0.0^\{commit\}::
58Shows the subject of the commit pointed to by the
59tag `v1.0.0`.
60
Junio C Hamanodb911ee2007-02-28 08:13:5261git show next~10:Documentation/README::
Junio C Hamano7d23f5e2006-12-16 07:44:0462Shows the contents of the file `Documentation/README` as
63they were current in the 10th last commit of the branch
64`next`.
65
Junio C Hamanodb911ee2007-02-28 08:13:5266git show master:Makefile master:t/Makefile::
Junio C Hamano7d23f5e2006-12-16 07:44:0467Concatenates the contents of said Makefiles in the head
68of the branch `master`.
69
Junio C Hamano775a0f42006-12-31 01:19:1470Discussion
71----------
72
73include::i18n.txt[]
74
Junio C Hamanod9d71c02006-02-08 00:52:3375Author
76------
77Written by Linus Torvalds <torvalds@osdl.org> and
Junio C Hamano0868a302008-07-22 09:20:4478Junio C Hamano <gitster@pobox.com>. Significantly enhanced by
Junio C Hamano775a0f42006-12-31 01:19:1479Johannes Schindelin <Johannes.Schindelin@gmx.de>.
Junio C Hamanod9d71c02006-02-08 00:52:3380
81
82Documentation
83-------------
84Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.
85
Junio C Hamanod9d71c02006-02-08 00:52:3386GIT
87---
Junio C Hamanof7c042d2008-06-06 22:50:5388Part of the linkgit:git[1] suite