blob: 23888cd612c9fb0c18ac1e24ac56a1a6f2a0a149 [file] [log] [blame]
Junio C Hamanod2179ef2010-10-22 04:12:171--pretty[=<format>]::
2--format=<format>::
Junio C Hamano0430e3a2007-05-15 03:13:173
Junio C Hamanoa3770f92007-07-25 08:53:334Pretty-print the contents of the commit logs in a given format,
Junio C Hamano0430e3a2007-05-15 03:13:175where '<format>' can be one of 'oneline', 'short', 'medium',
Junio C Hamanob4896852019-12-10 23:15:096'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'
Junio C Hamano6bb32e62015-02-17 22:11:267and 'tformat:<string>'. When '<format>' is none of the above,
8and has '%placeholder' in it, it acts as if
9'--pretty=tformat:<format>' were given.
10+
11See the "PRETTY FORMATS" section for some additional details for each
12format. When '=<format>' part is omitted, it defaults to 'medium'.
Junio C Hamano86bcccc2008-03-08 09:33:5513+
14Note: you can specify the default pretty format in the repository
15configuration (see linkgit:git-config[1]).
Junio C Hamano0430e3a2007-05-15 03:13:1716
Junio C Hamanoee695f22007-06-21 00:35:3617--abbrev-commit::
18Instead of showing the full 40-byte hexadecimal commit object
Junio C Hamanoee43d182020-11-11 22:10:4119name, show a prefix that names the object uniquely.
20"--abbrev=<n>" (which also modifies diff output, if it is displayed)
21option can be used to specify the minimum length of the prefix.
Junio C Hamanoee695f22007-06-21 00:35:3622+
23This should make "--pretty=oneline" a whole lot more readable for
24people using 80-column terminals.
25
Junio C Hamanof93530e2011-05-25 23:59:5926--no-abbrev-commit::
27Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamano558abd22020-09-03 20:22:3428`--abbrev-commit`, either explicit or implied by other options such
29as "--oneline". It also overrides the `log.abbrevCommit` variable.
Junio C Hamanof93530e2011-05-25 23:59:5930
Junio C Hamano0a235222009-03-06 08:21:0931--oneline::
32This is a shorthand for "--pretty=oneline --abbrev-commit"
33used together.
34
Junio C Hamanoc5bb3b32013-08-05 22:43:3635--encoding=<encoding>::
Junio C Hamano7d6f46e2021-09-10 19:54:2136Commit objects record the character encoding used for the log message
Junio C Hamano0430e3a2007-05-15 03:13:1737in their encoding header; this option can be used to tell the
38command to re-code the commit log message in the encoding
39preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:3440defaults to UTF-8. Note that if an object claims to be encoded
41in `X` and we are outputting in `X`, we will output the object
42verbatim; this means that invalid sequences in the original
Junio C Hamano7d6f46e2021-09-10 19:54:2143commit may be copied to the output. Likewise, if iconv(3) fails
Junio C Hamano19dcd3f2021-10-29 23:20:4744to convert the commit, we will quietly output the original
45object verbatim.
Junio C Hamano57827fb2010-01-23 03:02:5046
Junio C Hamano5996b672016-04-13 22:01:4147--expand-tabs=<n>::
48--expand-tabs::
49--no-expand-tabs::
50Perform a tab expansion (replace each tab with enough spaces
Junio C Hamano33be8212023-10-23 21:45:5451to fill to the next display column that is a multiple of '<n>')
Junio C Hamano5996b672016-04-13 22:01:4152in the log message before showing it in the output.
53`--expand-tabs` is a short-hand for `--expand-tabs=8`, and
54`--no-expand-tabs` is a short-hand for `--expand-tabs=0`,
55which disables tab expansion.
56+
57By default, tabs are expanded in pretty formats that indent the log
58message by 4 spaces (i.e. 'medium', which is the default, 'full',
59and 'fuller').
60
Junio C Hamano3891e252015-08-31 23:06:1361ifndef::git-rev-list[]
Junio C Hamanob3f862c2019-12-05 22:22:0062--notes[=<ref>]::
Junio C Hamano57827fb2010-01-23 03:02:5063Show the notes (see linkgit:git-notes[1]) that annotate the
64commit, when showing the commit log message. This is the default
65for `git log`, `git show` and `git whatchanged` commands when
Junio C Hamanod75148a2014-04-08 19:48:3866there is no `--pretty`, `--format`, or `--oneline` option given
Junio C Hamano60033462011-05-03 00:48:4367on the command line.
Junio C Hamano31667362010-03-25 00:38:5368+
Junio C Hamano60033462011-05-03 00:48:4369By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:0570`core.notesRef` and `notes.displayRef` variables (or corresponding
Junio C Hamano60033462011-05-03 00:48:4371environment overrides). See linkgit:git-config[1] for more details.
72+
Junio C Hamanob3f862c2019-12-05 22:22:0073With an optional '<ref>' argument, use the ref to find the notes
74to display. The ref can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:5175with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise
Junio C Hamano33be8212023-10-23 21:45:5476`refs/notes/` is prefixed to form the full name of the ref.
Junio C Hamano60033462011-05-03 00:48:4377+
78Multiple --notes options can be combined to control which notes are
79being displayed. Examples: "--notes=foo" will show only notes from
80"refs/notes/foo"; "--notes=foo --notes" will show both notes from
81"refs/notes/foo" and from the default notes ref(s).
Junio C Hamano31667362010-03-25 00:38:5382
Junio C Hamano60033462011-05-03 00:48:4383--no-notes::
84Do not show notes. This negates the above `--notes` option, by
85resetting the list of notes refs from which notes are shown.
86Options are parsed in the order given on the command line, so e.g.
87"--notes --notes=foo --no-notes --notes=bar" will only show notes
88from "refs/notes/bar".
89
Junio C Hamano2b1164d2023-09-29 16:43:2990--show-notes-by-default::
91Show the default notes unless options for displaying specific
92notes are given.
93
Junio C Hamanob3f862c2019-12-05 22:22:0094--show-notes[=<ref>]::
Junio C Hamano31667362010-03-25 00:38:5395--[no-]standard-notes::
Junio C Hamano60033462011-05-03 00:48:4396These options are deprecated. Use the above --notes/--no-notes
97options instead.
Junio C Hamano3891e252015-08-31 23:06:1398endif::git-rev-list[]
Junio C Hamano0acb1ae2012-09-24 21:28:1399
100--show-signature::
101Check the validity of a signed commit object by passing the signature
102to `gpg --verify` and show the output.