blob: 48b612e2ae50c319bcef567c7619f60396dd8408 [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 Hamanoba4b9282008-07-06 05:20:3119'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 Hamanoba4b9282008-07-06 05:20:3123For 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 Hamanoba4b9282008-07-06 05:20:3128The 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 Hamano35738e82008-01-07 07:55:4639"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
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 Hamanodb911ee2007-02-28 08:13:5257git show next~10:Documentation/README::
Junio C Hamano7d23f5e2006-12-16 07:44:0458Shows the contents of the file `Documentation/README` as
59they were current in the 10th last commit of the branch
60`next`.
61
Junio C Hamanodb911ee2007-02-28 08:13:5262git show master:Makefile master:t/Makefile::
Junio C Hamano7d23f5e2006-12-16 07:44:0463Concatenates the contents of said Makefiles in the head
64of the branch `master`.
65
Junio C Hamano775a0f42006-12-31 01:19:1466Discussion
67----------
68
69include::i18n.txt[]
70
Junio C Hamanod9d71c02006-02-08 00:52:3371Author
72------
73Written by Linus Torvalds <torvalds@osdl.org> and
Junio C Hamano0868a302008-07-22 09:20:4474Junio C Hamano <gitster@pobox.com>. Significantly enhanced by
Junio C Hamano775a0f42006-12-31 01:19:1475Johannes Schindelin <Johannes.Schindelin@gmx.de>.
Junio C Hamanod9d71c02006-02-08 00:52:3376
77
78Documentation
79-------------
80Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.
81
Junio C Hamanod9d71c02006-02-08 00:52:3382GIT
83---
Junio C Hamanof7c042d2008-06-06 22:50:5384Part of the linkgit:git[1] suite