blob: ae4edcccfbc2c862f4a1f77a5d58c348fbee2def [file] [log] [blame]
Petr Baudis4e783b42006-02-07 12:47:47 +01001git-show(1)
2===========
3
4NAME
5----
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +01006git-show - Show various types of objects
Petr Baudis4e783b42006-02-07 12:47:47 +01007
8
9SYNOPSIS
10--------
Martin von Zweigbergk7791a1d2011-07-01 22:38:26 -040011[verse]
Jonathan Niederb1889c32008-06-30 01:09:04 -050012'git show' [options] <object>...
Petr Baudis4e783b42006-02-07 12:47:47 +010013
14DESCRIPTION
15-----------
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010016Shows 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
Thomas Rast0b444cd2010-01-10 00:33:00 +010020'git diff-tree --cc'.
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010021
22For tags, it shows the tag message and the referenced objects.
23
Thomas Rast0b444cd2010-01-10 00:33:00 +010024For trees, it shows the names (equivalent to 'git ls-tree'
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010025with \--name-only).
26
27For plain blobs, it shows the plain contents.
Petr Baudis4e783b42006-02-07 12:47:47 +010028
Thomas Rast0b444cd2010-01-10 00:33:00 +010029The command takes options applicable to the 'git diff-tree' command to
Michael S. Tsirkin66e788b2007-02-08 15:22:21 -080030control how the changes the commit introduces are shown.
31
Petr Baudis4e783b42006-02-07 12:47:47 +010032This manual page describes only the most frequently used options.
33
34
35OPTIONS
36-------
Abhijit Menon-Senf448e242008-07-30 15:03:43 +053037<object>...::
38 The names of objects to show.
Shawn O. Pearce41a55642007-01-17 21:08:09 -050039 For a more complete list of ways to spell object names, see
Jonathan Nieder9d83e382010-10-11 11:03:32 -050040 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
Petr Baudis4e783b42006-02-07 12:47:47 +010041
Jakub Narebski331b51d2007-05-14 01:25:45 +020042include::pretty-options.txt[]
43
44
Chris Riddoch5d1faf82006-11-21 16:49:15 -070045include::pretty-formats.txt[]
Petr Baudis4e783b42006-02-07 12:47:47 +010046
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010047
48EXAMPLES
49--------
50
Jeff King5d2fc912011-08-03 20:13:29 -060051`git show v1.0.0`::
Junio C Hamano99e09cc2006-12-30 02:21:48 -080052 Shows the tag `v1.0.0`, along with the object the tags
53 points at.
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010054
Jeff King6cf378f2012-04-26 04:51:57 -040055`git show v1.0.0^{tree}`::
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010056 Shows the tree pointed to by the tag `v1.0.0`.
57
Jeff King6cf378f2012-04-26 04:51:57 -040058`git show -s --format=%s v1.0.0^{commit}`::
Jonathan Nieder60aa9cf2010-11-09 11:12:48 -060059 Shows the subject of the commit pointed to by the
60 tag `v1.0.0`.
61
Jeff King5d2fc912011-08-03 20:13:29 -060062`git show next~10:Documentation/README`::
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010063 Shows the contents of the file `Documentation/README` as
64 they were current in the 10th last commit of the branch
65 `next`.
66
Jeff King5d2fc912011-08-03 20:13:29 -060067`git show master:Makefile master:t/Makefile`::
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +010068 Concatenates the contents of said Makefiles in the head
69 of the branch `master`.
70
Junio C Hamano5dc7bcc2006-12-30 02:22:38 -080071Discussion
72----------
73
74include::i18n.txt[]
75
Petr Baudis4e783b42006-02-07 12:47:47 +010076GIT
77---
Christian Couder9e1f0a82008-06-06 09:07:32 +020078Part of the linkgit:git[1] suite