Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 1 | git-show(1) |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 6 | git-show - Show various types of objects |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 11 | [verse] |
Jonathan Nieder | b1889c3 | 2008-06-30 01:09:04 -0500 | [diff] [blame] | 12 | 'git show' [options] <object>... |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 16 | Shows one or more objects (blobs, trees, tags and commits). |
| 17 | |
| 18 | For commits it shows the log message and textual diff. It also |
| 19 | presents the merge commit in a special format as produced by |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 20 | 'git diff-tree --cc'. |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 21 | |
| 22 | For tags, it shows the tag message and the referenced objects. |
| 23 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 24 | For trees, it shows the names (equivalent to 'git ls-tree' |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 25 | with \--name-only). |
| 26 | |
| 27 | For plain blobs, it shows the plain contents. |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 28 | |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 29 | The command takes options applicable to the 'git diff-tree' command to |
Michael S. Tsirkin | 66e788b | 2007-02-08 15:22:21 -0800 | [diff] [blame] | 30 | control how the changes the commit introduces are shown. |
| 31 | |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 32 | This manual page describes only the most frequently used options. |
| 33 | |
| 34 | |
| 35 | OPTIONS |
| 36 | ------- |
Abhijit Menon-Sen | f448e24 | 2008-07-30 15:03:43 +0530 | [diff] [blame] | 37 | <object>...:: |
| 38 | The names of objects to show. |
Shawn O. Pearce | 41a5564 | 2007-01-17 21:08:09 -0500 | [diff] [blame] | 39 | For a more complete list of ways to spell object names, see |
Jonathan Nieder | 9d83e38 | 2010-10-11 11:03:32 -0500 | [diff] [blame] | 40 | "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 41 | |
Jakub Narebski | 331b51d | 2007-05-14 01:25:45 +0200 | [diff] [blame] | 42 | include::pretty-options.txt[] |
| 43 | |
| 44 | |
Chris Riddoch | 5d1faf8 | 2006-11-21 16:49:15 -0700 | [diff] [blame] | 45 | include::pretty-formats.txt[] |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 46 | |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 47 | |
| 48 | EXAMPLES |
| 49 | -------- |
| 50 | |
Jeff King | 5d2fc91 | 2011-08-03 20:13:29 -0600 | [diff] [blame] | 51 | `git show v1.0.0`:: |
Junio C Hamano | 99e09cc | 2006-12-30 02:21:48 -0800 | [diff] [blame] | 52 | Shows the tag `v1.0.0`, along with the object the tags |
| 53 | points at. |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 54 | |
Jeff King | 6cf378f | 2012-04-26 04:51:57 -0400 | [diff] [blame] | 55 | `git show v1.0.0^{tree}`:: |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 56 | Shows the tree pointed to by the tag `v1.0.0`. |
| 57 | |
Jeff King | 6cf378f | 2012-04-26 04:51:57 -0400 | [diff] [blame] | 58 | `git show -s --format=%s v1.0.0^{commit}`:: |
Jonathan Nieder | 60aa9cf | 2010-11-09 11:12:48 -0600 | [diff] [blame] | 59 | Shows the subject of the commit pointed to by the |
| 60 | tag `v1.0.0`. |
| 61 | |
Jeff King | 5d2fc91 | 2011-08-03 20:13:29 -0600 | [diff] [blame] | 62 | `git show next~10:Documentation/README`:: |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 63 | 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 King | 5d2fc91 | 2011-08-03 20:13:29 -0600 | [diff] [blame] | 67 | `git show master:Makefile master:t/Makefile`:: |
Johannes Schindelin | 5d7eeee | 2006-12-14 11:31:05 +0100 | [diff] [blame] | 68 | Concatenates the contents of said Makefiles in the head |
| 69 | of the branch `master`. |
| 70 | |
Junio C Hamano | 5dc7bcc | 2006-12-30 02:22:38 -0800 | [diff] [blame] | 71 | Discussion |
| 72 | ---------- |
| 73 | |
| 74 | include::i18n.txt[] |
| 75 | |
Petr Baudis | 4e783b4 | 2006-02-07 12:47:47 +0100 | [diff] [blame] | 76 | GIT |
| 77 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 78 | Part of the linkgit:git[1] suite |