Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 1 | git-show(1) |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 6 | git-show - Show various types of objects |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git show' [options] <object>... |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [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 |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 20 | 'git diff-tree --cc'. |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 21 | |
| 22 | For tags, it shows the tag message and the referenced objects. |
| 23 | |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 24 | For trees, it shows the names (equivalent to 'git ls-tree' |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 25 | with \--name-only). |
| 26 | |
| 27 | For plain blobs, it shows the plain contents. |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 28 | |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 29 | The command takes options applicable to the 'git diff-tree' command to |
Junio C Hamano | d333998 | 2007-02-09 08:38:48 | [diff] [blame] | 30 | control how the changes the commit introduces are shown. |
| 31 | |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 32 | This manual page describes only the most frequently used options. |
| 33 | |
| 34 | |
| 35 | OPTIONS |
| 36 | ------- |
Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 37 | <object>...:: |
| 38 | The names of objects to show. |
Junio C Hamano | 2d47c62 | 2007-01-18 06:24:10 | [diff] [blame] | 39 | For a more complete list of ways to spell object names, see |
Junio C Hamano | c27b733 | 2010-10-14 04:37:28 | [diff] [blame] | 40 | "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 41 | |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 42 | include::pretty-options.txt[] |
| 43 | |
| 44 | |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 45 | include::pretty-formats.txt[] |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 46 | |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 47 | |
| 48 | EXAMPLES |
| 49 | -------- |
| 50 | |
Junio C Hamano | 16ebcd0 | 2011-08-05 00:05:45 | [diff] [blame] | 51 | `git show v1.0.0`:: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 52 | Shows the tag `v1.0.0`, along with the object the tags |
| 53 | points at. |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 54 | |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 55 | `git show v1.0.0^{tree}`:: |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 56 | Shows the tree pointed to by the tag `v1.0.0`. |
| 57 | |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 58 | `git show -s --format=%s v1.0.0^{commit}`:: |
Junio C Hamano | c3fda57 | 2010-11-09 19:41:30 | [diff] [blame] | 59 | Shows the subject of the commit pointed to by the |
| 60 | tag `v1.0.0`. |
| 61 | |
Junio C Hamano | 16ebcd0 | 2011-08-05 00:05:45 | [diff] [blame] | 62 | `git show next~10:Documentation/README`:: |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [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 | |
Junio C Hamano | 16ebcd0 | 2011-08-05 00:05:45 | [diff] [blame] | 67 | `git show master:Makefile master:t/Makefile`:: |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 68 | Concatenates the contents of said Makefiles in the head |
| 69 | of the branch `master`. |
| 70 | |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 71 | Discussion |
| 72 | ---------- |
| 73 | |
| 74 | include::i18n.txt[] |
| 75 | |
Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 76 | GIT |
| 77 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 78 | Part of the linkgit:git[1] suite |