1GIT-LOG(1)                        Git Manual                        GIT-LOG(1)
2
3
4

NAME

6       git-log - Show commit logs
7

SYNOPSIS

9       git log [<options>] [<revision-range>] [[--] <path>...]
10

DESCRIPTION

12       Shows the commit logs.
13
14       List commits that are reachable by following the parent links from the
15       given commit(s), but exclude commits that are reachable from the one(s)
16       given with a ^ in front of them. The output is given in reverse
17       chronological order by default.
18
19       You can think of this as a set operation. Commits reachable from any of
20       the commits given on the command line form a set, and then commits
21       reachable from any of the ones given with ^ in front are subtracted
22       from that set. The remaining commits are what comes out in the
23       command’s output. Various other options and paths parameters can be
24       used to further limit the result.
25
26       Thus, the following command:
27
28           $ git log foo bar ^baz
29
30       means "list all the commits which are reachable from foo or bar, but
31       not from baz".
32
33       A special notation "<commit1>..<commit2>" can be used as a short-hand
34       for "^<commit1> <commit2>". For example, either of the following may be
35       used interchangeably:
36
37           $ git log origin..HEAD
38           $ git log HEAD ^origin
39
40       Another special notation is "<commit1>...<commit2>" which is useful for
41       merges. The resulting set of commits is the symmetric difference
42       between the two operands. The following two commands are equivalent:
43
44           $ git log A B --not $(git merge-base --all A B)
45           $ git log A...B
46
47       The command takes options applicable to the git-rev-list(1) command to
48       control what is shown and how, and options applicable to the git-
49       diff(1) command to control how the changes each commit introduces are
50       shown.
51

OPTIONS

53       --follow
54           Continue listing the history of a file beyond renames (works only
55           for a single file).
56
57       --no-decorate, --decorate[=short|full|auto|no]
58           Print out the ref names of any commits that are shown. If short is
59           specified, the ref name prefixes refs/heads/, refs/tags/ and
60           refs/remotes/ will not be printed. If full is specified, the full
61           ref name (including prefix) will be printed. If auto is specified,
62           then if the output is going to a terminal, the ref names are shown
63           as if short were given, otherwise no ref names are shown. The
64           option --decorate is short-hand for --decorate=short. Default to
65           configuration value of log.decorate if configured, otherwise, auto.
66
67       --decorate-refs=<pattern>, --decorate-refs-exclude=<pattern>
68           For each candidate reference, do not use it for decoration if it
69           matches any patterns given to --decorate-refs-exclude or if it
70           doesn’t match any of the patterns given to --decorate-refs. The
71           log.excludeDecoration config option allows excluding refs from the
72           decorations, but an explicit --decorate-refs pattern will override
73           a match in log.excludeDecoration.
74
75           If none of these options or config settings are given, then
76           references are used as decoration if they match HEAD, refs/heads/,
77           refs/remotes/, refs/stash/, or refs/tags/.
78
79       --clear-decorations
80           When specified, this option clears all previous --decorate-refs or
81           --decorate-refs-exclude options and relaxes the default decoration
82           filter to include all references. This option is assumed if the
83           config value log.initialDecorationSet is set to all.
84
85       --source
86           Print out the ref name given on the command line by which each
87           commit was reached.
88
89       --[no-]mailmap, --[no-]use-mailmap
90           Use mailmap file to map author and committer names and email
91           addresses to canonical real names and email addresses. See git-
92           shortlog(1).
93
94       --full-diff
95           Without this flag, git log -p <path>...  shows commits that touch
96           the specified paths, and diffs about the same specified paths. With
97           this, the full diff is shown for commits that touch the specified
98           paths; this means that "<path>..." limits only commits, and doesn’t
99           limit diff for those commits.
100
101           Note that this affects all diff-based output types, e.g. those
102           produced by --stat, etc.
103
104       --log-size
105           Include a line “log size <number>” in the output for each commit,
106           where <number> is the length of that commit’s message in bytes.
107           Intended to speed up tools that read log messages from git log
108           output by allowing them to allocate space in advance.
109
110       -L<start>,<end>:<file>, -L:<funcname>:<file>
111           Trace the evolution of the line range given by <start>,<end>, or by
112           the function name regex <funcname>, within the <file>. You may not
113           give any pathspec limiters. This is currently limited to a walk
114           starting from a single revision, i.e., you may only give zero or
115           one positive revision arguments, and <start> and <end> (or
116           <funcname>) must exist in the starting revision. You can specify
117           this option more than once. Implies --patch. Patch output can be
118           suppressed using --no-patch, but other diff formats (namely --raw,
119           --numstat, --shortstat, --dirstat, --summary, --name-only,
120           --name-status, --check) are not currently implemented.
121
122           <start> and <end> can take one of these forms:
123
124           •   number
125
126               If <start> or <end> is a number, it specifies an absolute line
127               number (lines count from 1).
128
129/regex/
130
131               This form will use the first line matching the given POSIX
132               regex. If <start> is a regex, it will search from the end of
133               the previous -L range, if any, otherwise from the start of
134               file. If <start> is ^/regex/, it will search from the start of
135               file. If <end> is a regex, it will search starting at the line
136               given by <start>.
137
138           •   +offset or -offset
139
140               This is only valid for <end> and will specify a number of lines
141               before or after the line given by <start>.
142
143           If :<funcname> is given in place of <start> and <end>, it is a
144           regular expression that denotes the range from the first funcname
145           line that matches <funcname>, up to the next funcname line.
146           :<funcname> searches from the end of the previous -L range, if any,
147           otherwise from the start of file.  ^:<funcname> searches from the
148           start of file. The function names are determined in the same way as
149           git diff works out patch hunk headers (see Defining a custom
150           hunk-header in gitattributes(5)).
151
152       <revision-range>
153           Show only commits in the specified revision range. When no
154           <revision-range> is specified, it defaults to HEAD (i.e. the whole
155           history leading to the current commit).  origin..HEAD specifies all
156           the commits reachable from the current commit (i.e.  HEAD), but not
157           from origin. For a complete list of ways to spell <revision-range>,
158           see the Specifying Ranges section of gitrevisions(7).
159
160       [--] <path>...
161           Show only commits that are enough to explain how the files that
162           match the specified paths came to be. See History Simplification
163           below for details and other simplification modes.
164
165           Paths may need to be prefixed with -- to separate them from options
166           or the revision range, when confusion arises.
167
168   Commit Limiting
169       Besides specifying a range of commits that should be listed using the
170       special notations explained in the description, additional commit
171       limiting may be applied.
172
173       Using more options generally further limits the output (e.g.
174       --since=<date1> limits to commits newer than <date1>, and using it with
175       --grep=<pattern> further limits to commits whose log message has a line
176       that matches <pattern>), unless otherwise noted.
177
178       Note that these are applied before commit ordering and formatting
179       options, such as --reverse.
180
181       -<number>, -n <number>, --max-count=<number>
182           Limit the number of commits to output.
183
184       --skip=<number>
185           Skip number commits before starting to show the commit output.
186
187       --since=<date>, --after=<date>
188           Show commits more recent than a specific date.
189
190       --since-as-filter=<date>
191           Show all commits more recent than a specific date. This visits all
192           commits in the range, rather than stopping at the first commit
193           which is older than a specific date.
194
195       --until=<date>, --before=<date>
196           Show commits older than a specific date.
197
198       --author=<pattern>, --committer=<pattern>
199           Limit the commits output to ones with author/committer header lines
200           that match the specified pattern (regular expression). With more
201           than one --author=<pattern>, commits whose author matches any of
202           the given patterns are chosen (similarly for multiple
203           --committer=<pattern>).
204
205       --grep-reflog=<pattern>
206           Limit the commits output to ones with reflog entries that match the
207           specified pattern (regular expression). With more than one
208           --grep-reflog, commits whose reflog message matches any of the
209           given patterns are chosen. It is an error to use this option unless
210           --walk-reflogs is in use.
211
212       --grep=<pattern>
213           Limit the commits output to ones with log message that matches the
214           specified pattern (regular expression). With more than one
215           --grep=<pattern>, commits whose message matches any of the given
216           patterns are chosen (but see --all-match).
217
218           When --notes is in effect, the message from the notes is matched as
219           if it were part of the log message.
220
221       --all-match
222           Limit the commits output to ones that match all given --grep,
223           instead of ones that match at least one.
224
225       --invert-grep
226           Limit the commits output to ones with log message that do not match
227           the pattern specified with --grep=<pattern>.
228
229       -i, --regexp-ignore-case
230           Match the regular expression limiting patterns without regard to
231           letter case.
232
233       --basic-regexp
234           Consider the limiting patterns to be basic regular expressions;
235           this is the default.
236
237       -E, --extended-regexp
238           Consider the limiting patterns to be extended regular expressions
239           instead of the default basic regular expressions.
240
241       -F, --fixed-strings
242           Consider the limiting patterns to be fixed strings (don’t interpret
243           pattern as a regular expression).
244
245       -P, --perl-regexp
246           Consider the limiting patterns to be Perl-compatible regular
247           expressions.
248
249           Support for these types of regular expressions is an optional
250           compile-time dependency. If Git wasn’t compiled with support for
251           them providing this option will cause it to die.
252
253       --remove-empty
254           Stop when a given path disappears from the tree.
255
256       --merges
257           Print only merge commits. This is exactly the same as
258           --min-parents=2.
259
260       --no-merges
261           Do not print commits with more than one parent. This is exactly the
262           same as --max-parents=1.
263
264       --min-parents=<number>, --max-parents=<number>, --no-min-parents,
265       --no-max-parents
266           Show only commits which have at least (or at most) that many parent
267           commits. In particular, --max-parents=1 is the same as --no-merges,
268           --min-parents=2 is the same as --merges.  --max-parents=0 gives all
269           root commits and --min-parents=3 all octopus merges.
270
271           --no-min-parents and --no-max-parents reset these limits (to no
272           limit) again. Equivalent forms are --min-parents=0 (any commit has
273           0 or more parents) and --max-parents=-1 (negative numbers denote no
274           upper limit).
275
276       --first-parent
277           When finding commits to include, follow only the first parent
278           commit upon seeing a merge commit. This option can give a better
279           overview when viewing the evolution of a particular topic branch,
280           because merges into a topic branch tend to be only about adjusting
281           to updated upstream from time to time, and this option allows you
282           to ignore the individual commits brought in to your history by such
283           a merge.
284
285           This option also changes default diff format for merge commits to
286           first-parent, see --diff-merges=first-parent for details.
287
288       --exclude-first-parent-only
289           When finding commits to exclude (with a ^), follow only the first
290           parent commit upon seeing a merge commit. This can be used to find
291           the set of changes in a topic branch from the point where it
292           diverged from the remote branch, given that arbitrary merges can be
293           valid topic branch changes.
294
295       --not
296           Reverses the meaning of the ^ prefix (or lack thereof) for all
297           following revision specifiers, up to the next --not.
298
299       --all
300           Pretend as if all the refs in refs/, along with HEAD, are listed on
301           the command line as <commit>.
302
303       --branches[=<pattern>]
304           Pretend as if all the refs in refs/heads are listed on the command
305           line as <commit>. If <pattern> is given, limit branches to ones
306           matching given shell glob. If pattern lacks ?, *, or [, /* at the
307           end is implied.
308
309       --tags[=<pattern>]
310           Pretend as if all the refs in refs/tags are listed on the command
311           line as <commit>. If <pattern> is given, limit tags to ones
312           matching given shell glob. If pattern lacks ?, *, or [, /* at the
313           end is implied.
314
315       --remotes[=<pattern>]
316           Pretend as if all the refs in refs/remotes are listed on the
317           command line as <commit>. If <pattern> is given, limit
318           remote-tracking branches to ones matching given shell glob. If
319           pattern lacks ?, *, or [, /* at the end is implied.
320
321       --glob=<glob-pattern>
322           Pretend as if all the refs matching shell glob <glob-pattern> are
323           listed on the command line as <commit>. Leading refs/, is
324           automatically prepended if missing. If pattern lacks ?, *, or [, /*
325           at the end is implied.
326
327       --exclude=<glob-pattern>
328           Do not include refs matching <glob-pattern> that the next --all,
329           --branches, --tags, --remotes, or --glob would otherwise consider.
330           Repetitions of this option accumulate exclusion patterns up to the
331           next --all, --branches, --tags, --remotes, or --glob option (other
332           options or arguments do not clear accumulated patterns).
333
334           The patterns given should not begin with refs/heads, refs/tags, or
335           refs/remotes when applied to --branches, --tags, or --remotes,
336           respectively, and they must begin with refs/ when applied to --glob
337           or --all. If a trailing /* is intended, it must be given
338           explicitly.
339
340       --exclude-hidden=[receive|uploadpack]
341           Do not include refs that would be hidden by git-receive-pack or
342           git-upload-pack by consulting the appropriate receive.hideRefs or
343           uploadpack.hideRefs configuration along with transfer.hideRefs (see
344           git-config(1)). This option affects the next pseudo-ref option
345           --all or --glob and is cleared after processing them.
346
347       --reflog
348           Pretend as if all objects mentioned by reflogs are listed on the
349           command line as <commit>.
350
351       --alternate-refs
352           Pretend as if all objects mentioned as ref tips of alternate
353           repositories were listed on the command line. An alternate
354           repository is any repository whose object directory is specified in
355           objects/info/alternates. The set of included objects may be
356           modified by core.alternateRefsCommand, etc. See git-config(1).
357
358       --single-worktree
359           By default, all working trees will be examined by the following
360           options when there are more than one (see git-worktree(1)): --all,
361           --reflog and --indexed-objects. This option forces them to examine
362           the current working tree only.
363
364       --ignore-missing
365           Upon seeing an invalid object name in the input, pretend as if the
366           bad input was not given.
367
368       --bisect
369           Pretend as if the bad bisection ref refs/bisect/bad was listed and
370           as if it was followed by --not and the good bisection refs
371           refs/bisect/good-* on the command line.
372
373       --stdin
374           In addition to the <commit> listed on the command line, read them
375           from the standard input. If a -- separator is seen, stop reading
376           commits and start reading paths to limit the result.
377
378       --cherry-mark
379           Like --cherry-pick (see below) but mark equivalent commits with =
380           rather than omitting them, and inequivalent ones with +.
381
382       --cherry-pick
383           Omit any commit that introduces the same change as another commit
384           on the “other side” when the set of commits are limited with
385           symmetric difference.
386
387           For example, if you have two branches, A and B, a usual way to list
388           all commits on only one side of them is with --left-right (see the
389           example below in the description of the --left-right option).
390           However, it shows the commits that were cherry-picked from the
391           other branch (for example, “3rd on b” may be cherry-picked from
392           branch A). With this option, such pairs of commits are excluded
393           from the output.
394
395       --left-only, --right-only
396           List only commits on the respective side of a symmetric difference,
397           i.e. only those which would be marked < resp.  > by --left-right.
398
399           For example, --cherry-pick --right-only A...B omits those commits
400           from B which are in A or are patch-equivalent to a commit in A. In
401           other words, this lists the + commits from git cherry A B. More
402           precisely, --cherry-pick --right-only --no-merges gives the exact
403           list.
404
405       --cherry
406           A synonym for --right-only --cherry-mark --no-merges; useful to
407           limit the output to the commits on our side and mark those that
408           have been applied to the other side of a forked history with git
409           log --cherry upstream...mybranch, similar to git cherry upstream
410           mybranch.
411
412       -g, --walk-reflogs
413           Instead of walking the commit ancestry chain, walk reflog entries
414           from the most recent one to older ones. When this option is used
415           you cannot specify commits to exclude (that is, ^commit,
416           commit1..commit2, and commit1...commit2 notations cannot be used).
417
418           With --pretty format other than oneline and reference (for obvious
419           reasons), this causes the output to have two extra lines of
420           information taken from the reflog. The reflog designator in the
421           output may be shown as ref@{Nth} (where Nth is the
422           reverse-chronological index in the reflog) or as ref@{timestamp}
423           (with the timestamp for that entry), depending on a few rules:
424
425            1. If the starting point is specified as ref@{Nth}, show the index
426               format.
427
428            2. If the starting point was specified as ref@{now}, show the
429               timestamp format.
430
431            3. If neither was used, but --date was given on the command line,
432               show the timestamp in the format requested by --date.
433
434            4. Otherwise, show the index format.
435
436           Under --pretty=oneline, the commit message is prefixed with this
437           information on the same line. This option cannot be combined with
438           --reverse. See also git-reflog(1).
439
440           Under --pretty=reference, this information will not be shown at
441           all.
442
443       --merge
444           After a failed merge, show refs that touch files having a conflict
445           and don’t exist on all heads to merge.
446
447       --boundary
448           Output excluded boundary commits. Boundary commits are prefixed
449           with -.
450
451   History Simplification
452       Sometimes you are only interested in parts of the history, for example
453       the commits modifying a particular <path>. But there are two parts of
454       History Simplification, one part is selecting the commits and the other
455       is how to do it, as there are various strategies to simplify the
456       history.
457
458       The following options select the commits to be shown:
459
460       <paths>
461           Commits modifying the given <paths> are selected.
462
463       --simplify-by-decoration
464           Commits that are referred by some branch or tag are selected.
465
466       Note that extra commits can be shown to give a meaningful history.
467
468       The following options affect the way the simplification is performed:
469
470       Default mode
471           Simplifies the history to the simplest history explaining the final
472           state of the tree. Simplest because it prunes some side branches if
473           the end result is the same (i.e. merging branches with the same
474           content)
475
476       --show-pulls
477           Include all commits from the default mode, but also any merge
478           commits that are not TREESAME to the first parent but are TREESAME
479           to a later parent. This mode is helpful for showing the merge
480           commits that "first introduced" a change to a branch.
481
482       --full-history
483           Same as the default mode, but does not prune some history.
484
485       --dense
486           Only the selected commits are shown, plus some to have a meaningful
487           history.
488
489       --sparse
490           All commits in the simplified history are shown.
491
492       --simplify-merges
493           Additional option to --full-history to remove some needless merges
494           from the resulting history, as there are no selected commits
495           contributing to this merge.
496
497       --ancestry-path[=<commit>]
498           When given a range of commits to display (e.g.  commit1..commit2 or
499           commit2 ^commit1), only display commits in that range that are
500           ancestors of <commit>, descendants of <commit>, or <commit> itself.
501           If no commit is specified, use commit1 (the excluded part of the
502           range) as <commit>. Can be passed multiple times; if so, a commit
503           is included if it is any of the commits given or if it is an
504           ancestor or descendant of one of them.
505
506       A more detailed explanation follows.
507
508       Suppose you specified foo as the <paths>. We shall call commits that
509       modify foo !TREESAME, and the rest TREESAME. (In a diff filtered for
510       foo, they look different and equal, respectively.)
511
512       In the following, we will always refer to the same example history to
513       illustrate the differences between simplification settings. We assume
514       that you are filtering for a file foo in this commit graph:
515
516                     .-A---M---N---O---P---Q
517                    /     /   /   /   /   /
518                   I     B   C   D   E   Y
519                    \   /   /   /   /   /
520                     `-------------'   X
521
522       The horizontal line of history A---Q is taken to be the first parent of
523       each merge. The commits are:
524
525I is the initial commit, in which foo exists with contents “asdf”,
526           and a file quux exists with contents “quux”. Initial commits are
527           compared to an empty tree, so I is !TREESAME.
528
529       •   In A, foo contains just “foo”.
530
531B contains the same change as A. Its merge M is trivial and hence
532           TREESAME to all parents.
533
534C does not change foo, but its merge N changes it to “foobar”, so
535           it is not TREESAME to any parent.
536
537D sets foo to “baz”. Its merge O combines the strings from N and D
538           to “foobarbaz”; i.e., it is not TREESAME to any parent.
539
540E changes quux to “xyzzy”, and its merge P combines the strings to
541           “quux xyzzy”.  P is TREESAME to O, but not to E.
542
543X is an independent root commit that added a new file side, and Y
544           modified it.  Y is TREESAME to X. Its merge Q added side to P, and
545           Q is TREESAME to P, but not to Y.
546
547       rev-list walks backwards through history, including or excluding
548       commits based on whether --full-history and/or parent rewriting (via
549       --parents or --children) are used. The following settings are
550       available.
551
552       Default mode
553           Commits are included if they are not TREESAME to any parent (though
554           this can be changed, see --sparse below). If the commit was a
555           merge, and it was TREESAME to one parent, follow only that parent.
556           (Even if there are several TREESAME parents, follow only one of
557           them.) Otherwise, follow all parents.
558
559           This results in:
560
561                         .-A---N---O
562                        /     /   /
563                       I---------D
564
565           Note how the rule to only follow the TREESAME parent, if one is
566           available, removed B from consideration entirely.  C was considered
567           via N, but is TREESAME. Root commits are compared to an empty tree,
568           so I is !TREESAME.
569
570           Parent/child relations are only visible with --parents, but that
571           does not affect the commits selected in default mode, so we have
572           shown the parent lines.
573
574       --full-history without parent rewriting
575           This mode differs from the default in one point: always follow all
576           parents of a merge, even if it is TREESAME to one of them. Even if
577           more than one side of the merge has commits that are included, this
578           does not imply that the merge itself is! In the example, we get
579
580                       I  A  B  N  D  O  P  Q
581
582           M was excluded because it is TREESAME to both parents.  E, C and B
583           were all walked, but only B was !TREESAME, so the others do not
584           appear.
585
586           Note that without parent rewriting, it is not really possible to
587           talk about the parent/child relationships between the commits, so
588           we show them disconnected.
589
590       --full-history with parent rewriting
591           Ordinary commits are only included if they are !TREESAME (though
592           this can be changed, see --sparse below).
593
594           Merges are always included. However, their parent list is
595           rewritten: Along each parent, prune away commits that are not
596           included themselves. This results in
597
598                         .-A---M---N---O---P---Q
599                        /     /   /   /   /
600                       I     B   /   D   /
601                        \   /   /   /   /
602                         `-------------'
603
604           Compare to --full-history without rewriting above. Note that E was
605           pruned away because it is TREESAME, but the parent list of P was
606           rewritten to contain E's parent I. The same happened for C and N,
607           and X, Y and Q.
608
609       In addition to the above settings, you can change whether TREESAME
610       affects inclusion:
611
612       --dense
613           Commits that are walked are included if they are not TREESAME to
614           any parent.
615
616       --sparse
617           All commits that are walked are included.
618
619           Note that without --full-history, this still simplifies merges: if
620           one of the parents is TREESAME, we follow only that one, so the
621           other sides of the merge are never walked.
622
623       --simplify-merges
624           First, build a history graph in the same way that --full-history
625           with parent rewriting does (see above).
626
627           Then simplify each commit C to its replacement C' in the final
628           history according to the following rules:
629
630           •   Set C' to C.
631
632           •   Replace each parent P of C' with its simplification P'. In the
633               process, drop parents that are ancestors of other parents or
634               that are root commits TREESAME to an empty tree, and remove
635               duplicates, but take care to never drop all parents that we are
636               TREESAME to.
637
638           •   If after this parent rewriting, C' is a root or merge commit
639               (has zero or >1 parents), a boundary commit, or !TREESAME, it
640               remains. Otherwise, it is replaced with its only parent.
641
642           The effect of this is best shown by way of comparing to
643           --full-history with parent rewriting. The example turns into:
644
645                         .-A---M---N---O
646                        /     /       /
647                       I     B       D
648                        \   /       /
649                         `---------'
650
651           Note the major differences in N, P, and Q over --full-history:
652
653N's parent list had I removed, because it is an ancestor of the
654               other parent M. Still, N remained because it is !TREESAME.
655
656P's parent list similarly had I removed.  P was then removed
657               completely, because it had one parent and is TREESAME.
658
659Q's parent list had Y simplified to X.  X was then removed,
660               because it was a TREESAME root.  Q was then removed completely,
661               because it had one parent and is TREESAME.
662
663       There is another simplification mode available:
664
665       --ancestry-path[=<commit>]
666           Limit the displayed commits to those which are an ancestor of
667           <commit>, or which are a descendant of <commit>, or are <commit>
668           itself.
669
670           As an example use case, consider the following commit history:
671
672                           D---E-------F
673                          /     \       \
674                         B---C---G---H---I---J
675                        /                     \
676                       A-------K---------------L--M
677
678           A regular D..M computes the set of commits that are ancestors of M,
679           but excludes the ones that are ancestors of D. This is useful to
680           see what happened to the history leading to M since D, in the sense
681           that “what does M have that did not exist in D”. The result in this
682           example would be all the commits, except A and B (and D itself, of
683           course).
684
685           When we want to find out what commits in M are contaminated with
686           the bug introduced by D and need fixing, however, we might want to
687           view only the subset of D..M that are actually descendants of D,
688           i.e. excluding C and K. This is exactly what the --ancestry-path
689           option does. Applied to the D..M range, it results in:
690
691                               E-------F
692                                \       \
693                                 G---H---I---J
694                                              \
695                                               L--M
696
697           We can also use --ancestry-path=D instead of --ancestry-path which
698           means the same thing when applied to the D..M range but is just
699           more explicit.
700
701           If we instead are interested in a given topic within this range,
702           and all commits affected by that topic, we may only want to view
703           the subset of D..M which contain that topic in their ancestry path.
704           So, using --ancestry-path=H D..M for example would result in:
705
706                               E
707                                \
708                                 G---H---I---J
709                                              \
710                                               L--M
711
712           Whereas --ancestry-path=K D..M would result in
713
714                               K---------------L--M
715
716       Before discussing another option, --show-pulls, we need to create a new
717       example history.
718
719       A common problem users face when looking at simplified history is that
720       a commit they know changed a file somehow does not appear in the file’s
721       simplified history. Let’s demonstrate a new example and show how
722       options such as --full-history and --simplify-merges works in that
723       case:
724
725                     .-A---M-----C--N---O---P
726                    /     / \  \  \/   /   /
727                   I     B   \  R-'`-Z'   /
728                    \   /     \/         /
729                     \ /      /\        /
730                      `---X--'  `---Y--'
731
732       For this example, suppose I created file.txt which was modified by A,
733       B, and X in different ways. The single-parent commits C, Z, and Y do
734       not change file.txt. The merge commit M was created by resolving the
735       merge conflict to include both changes from A and B and hence is not
736       TREESAME to either. The merge commit R, however, was created by
737       ignoring the contents of file.txt at M and taking only the contents of
738       file.txt at X. Hence, R is TREESAME to X but not M. Finally, the
739       natural merge resolution to create N is to take the contents of
740       file.txt at R, so N is TREESAME to R but not C. The merge commits O and
741       P are TREESAME to their first parents, but not to their second parents,
742       Z and Y respectively.
743
744       When using the default mode, N and R both have a TREESAME parent, so
745       those edges are walked and the others are ignored. The resulting
746       history graph is:
747
748                   I---X
749
750       When using --full-history, Git walks every edge. This will discover the
751       commits A and B and the merge M, but also will reveal the merge commits
752       O and P. With parent rewriting, the resulting graph is:
753
754                     .-A---M--------N---O---P
755                    /     / \  \  \/   /   /
756                   I     B   \  R-'`--'   /
757                    \   /     \/         /
758                     \ /      /\        /
759                      `---X--'  `------'
760
761       Here, the merge commits O and P contribute extra noise, as they did not
762       actually contribute a change to file.txt. They only merged a topic that
763       was based on an older version of file.txt. This is a common issue in
764       repositories using a workflow where many contributors work in parallel
765       and merge their topic branches along a single trunk: many unrelated
766       merges appear in the --full-history results.
767
768       When using the --simplify-merges option, the commits O and P disappear
769       from the results. This is because the rewritten second parents of O and
770       P are reachable from their first parents. Those edges are removed and
771       then the commits look like single-parent commits that are TREESAME to
772       their parent. This also happens to the commit N, resulting in a history
773       view as follows:
774
775                     .-A---M--.
776                    /     /    \
777                   I     B      R
778                    \   /      /
779                     \ /      /
780                      `---X--'
781
782       In this view, we see all of the important single-parent changes from A,
783       B, and X. We also see the carefully-resolved merge M and the
784       not-so-carefully-resolved merge R. This is usually enough information
785       to determine why the commits A and B "disappeared" from history in the
786       default view. However, there are a few issues with this approach.
787
788       The first issue is performance. Unlike any previous option, the
789       --simplify-merges option requires walking the entire commit history
790       before returning a single result. This can make the option difficult to
791       use for very large repositories.
792
793       The second issue is one of auditing. When many contributors are working
794       on the same repository, it is important which merge commits introduced
795       a change into an important branch. The problematic merge R above is not
796       likely to be the merge commit that was used to merge into an important
797       branch. Instead, the merge N was used to merge R and X into the
798       important branch. This commit may have information about why the change
799       X came to override the changes from A and B in its commit message.
800
801       --show-pulls
802           In addition to the commits shown in the default history, show each
803           merge commit that is not TREESAME to its first parent but is
804           TREESAME to a later parent.
805
806           When a merge commit is included by --show-pulls, the merge is
807           treated as if it "pulled" the change from another branch. When
808           using --show-pulls on this example (and no other options) the
809           resulting graph is:
810
811                       I---X---R---N
812
813           Here, the merge commits R and N are included because they pulled
814           the commits X and R into the base branch, respectively. These
815           merges are the reason the commits A and B do not appear in the
816           default history.
817
818           When --show-pulls is paired with --simplify-merges, the graph
819           includes all of the necessary information:
820
821                         .-A---M--.   N
822                        /     /    \ /
823                       I     B      R
824                        \   /      /
825                         \ /      /
826                          `---X--'
827
828           Notice that since M is reachable from R, the edge from N to M was
829           simplified away. However, N still appears in the history as an
830           important commit because it "pulled" the change R into the main
831           branch.
832
833       The --simplify-by-decoration option allows you to view only the big
834       picture of the topology of the history, by omitting commits that are
835       not referenced by tags. Commits are marked as !TREESAME (in other
836       words, kept after history simplification rules described above) if (1)
837       they are referenced by tags, or (2) they change the contents of the
838       paths given on the command line. All other commits are marked as
839       TREESAME (subject to be simplified away).
840
841   Commit Ordering
842       By default, the commits are shown in reverse chronological order.
843
844       --date-order
845           Show no parents before all of its children are shown, but otherwise
846           show commits in the commit timestamp order.
847
848       --author-date-order
849           Show no parents before all of its children are shown, but otherwise
850           show commits in the author timestamp order.
851
852       --topo-order
853           Show no parents before all of its children are shown, and avoid
854           showing commits on multiple lines of history intermixed.
855
856           For example, in a commit history like this:
857
858                   ---1----2----4----7
859                       \              \
860                        3----5----6----8---
861
862           where the numbers denote the order of commit timestamps, git
863           rev-list and friends with --date-order show the commits in the
864           timestamp order: 8 7 6 5 4 3 2 1.
865
866           With --topo-order, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
867           3 1); some older commits are shown before newer ones in order to
868           avoid showing the commits from two parallel development track mixed
869           together.
870
871       --reverse
872           Output the commits chosen to be shown (see Commit Limiting section
873           above) in reverse order. Cannot be combined with --walk-reflogs.
874
875   Object Traversal
876       These options are mostly targeted for packing of Git repositories.
877
878       --no-walk[=(sorted|unsorted)]
879           Only show the given commits, but do not traverse their ancestors.
880           This has no effect if a range is specified. If the argument
881           unsorted is given, the commits are shown in the order they were
882           given on the command line. Otherwise (if sorted or no argument was
883           given), the commits are shown in reverse chronological order by
884           commit time. Cannot be combined with --graph.
885
886       --do-walk
887           Overrides a previous --no-walk.
888
889   Commit Formatting
890       --pretty[=<format>], --format=<format>
891           Pretty-print the contents of the commit logs in a given format,
892           where <format> can be one of oneline, short, medium, full, fuller,
893           reference, email, raw, format:<string> and tformat:<string>. When
894           <format> is none of the above, and has %placeholder in it, it acts
895           as if --pretty=tformat:<format> were given.
896
897           See the "PRETTY FORMATS" section for some additional details for
898           each format. When =<format> part is omitted, it defaults to medium.
899
900           Note: you can specify the default pretty format in the repository
901           configuration (see git-config(1)).
902
903       --abbrev-commit
904           Instead of showing the full 40-byte hexadecimal commit object name,
905           show a prefix that names the object uniquely. "--abbrev=<n>" (which
906           also modifies diff output, if it is displayed) option can be used
907           to specify the minimum length of the prefix.
908
909           This should make "--pretty=oneline" a whole lot more readable for
910           people using 80-column terminals.
911
912       --no-abbrev-commit
913           Show the full 40-byte hexadecimal commit object name. This negates
914           --abbrev-commit, either explicit or implied by other options such
915           as "--oneline". It also overrides the log.abbrevCommit variable.
916
917       --oneline
918           This is a shorthand for "--pretty=oneline --abbrev-commit" used
919           together.
920
921       --encoding=<encoding>
922           Commit objects record the character encoding used for the log
923           message in their encoding header; this option can be used to tell
924           the command to re-code the commit log message in the encoding
925           preferred by the user. For non plumbing commands this defaults to
926           UTF-8. Note that if an object claims to be encoded in X and we are
927           outputting in X, we will output the object verbatim; this means
928           that invalid sequences in the original commit may be copied to the
929           output. Likewise, if iconv(3) fails to convert the commit, we will
930           quietly output the original object verbatim.
931
932       --expand-tabs=<n>, --expand-tabs, --no-expand-tabs
933           Perform a tab expansion (replace each tab with enough spaces to
934           fill to the next display column that is multiple of <n>) in the log
935           message before showing it in the output.  --expand-tabs is a
936           short-hand for --expand-tabs=8, and --no-expand-tabs is a
937           short-hand for --expand-tabs=0, which disables tab expansion.
938
939           By default, tabs are expanded in pretty formats that indent the log
940           message by 4 spaces (i.e.  medium, which is the default, full, and
941           fuller).
942
943       --notes[=<ref>]
944           Show the notes (see git-notes(1)) that annotate the commit, when
945           showing the commit log message. This is the default for git log,
946           git show and git whatchanged commands when there is no --pretty,
947           --format, or --oneline option given on the command line.
948
949           By default, the notes shown are from the notes refs listed in the
950           core.notesRef and notes.displayRef variables (or corresponding
951           environment overrides). See git-config(1) for more details.
952
953           With an optional <ref> argument, use the ref to find the notes to
954           display. The ref can specify the full refname when it begins with
955           refs/notes/; when it begins with notes/, refs/ and otherwise
956           refs/notes/ is prefixed to form a full name of the ref.
957
958           Multiple --notes options can be combined to control which notes are
959           being displayed. Examples: "--notes=foo" will show only notes from
960           "refs/notes/foo"; "--notes=foo --notes" will show both notes from
961           "refs/notes/foo" and from the default notes ref(s).
962
963       --no-notes
964           Do not show notes. This negates the above --notes option, by
965           resetting the list of notes refs from which notes are shown.
966           Options are parsed in the order given on the command line, so e.g.
967           "--notes --notes=foo --no-notes --notes=bar" will only show notes
968           from "refs/notes/bar".
969
970       --show-notes[=<ref>], --[no-]standard-notes
971           These options are deprecated. Use the above --notes/--no-notes
972           options instead.
973
974       --show-signature
975           Check the validity of a signed commit object by passing the
976           signature to gpg --verify and show the output.
977
978       --relative-date
979           Synonym for --date=relative.
980
981       --date=<format>
982           Only takes effect for dates shown in human-readable format, such as
983           when using --pretty.  log.date config variable sets a default value
984           for the log command’s --date option. By default, dates are shown in
985           the original time zone (either committer’s or author’s). If -local
986           is appended to the format (e.g., iso-local), the user’s local time
987           zone is used instead.
988
989           --date=relative shows dates relative to the current time, e.g.  “2
990           hours ago”. The -local option has no effect for --date=relative.
991
992           --date=local is an alias for --date=default-local.
993
994           --date=iso (or --date=iso8601) shows timestamps in a ISO 8601-like
995           format. The differences to the strict ISO 8601 format are:
996
997           •   a space instead of the T date/time delimiter
998
999           •   a space between time and time zone
1000
1001           •   no colon between hours and minutes of the time zone
1002
1003           --date=iso-strict (or --date=iso8601-strict) shows timestamps in
1004           strict ISO 8601 format.
1005
1006           --date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format,
1007           often found in email messages.
1008
1009           --date=short shows only the date, but not the time, in YYYY-MM-DD
1010           format.
1011
1012           --date=raw shows the date as seconds since the epoch (1970-01-01
1013           00:00:00 UTC), followed by a space, and then the timezone as an
1014           offset from UTC (a + or - with four digits; the first two are
1015           hours, and the second two are minutes). I.e., as if the timestamp
1016           were formatted with strftime("%s %z")). Note that the -local option
1017           does not affect the seconds-since-epoch value (which is always
1018           measured in UTC), but does switch the accompanying timezone value.
1019
1020           --date=human shows the timezone if the timezone does not match the
1021           current time-zone, and doesn’t print the whole date if that matches
1022           (ie skip printing year for dates that are "this year", but also
1023           skip the whole date itself if it’s in the last few days and we can
1024           just say what weekday it was). For older dates the hour and minute
1025           is also omitted.
1026
1027           --date=unix shows the date as a Unix epoch timestamp (seconds since
1028           1970). As with --raw, this is always in UTC and therefore -local
1029           has no effect.
1030
1031           --date=format:...  feeds the format ...  to your system strftime,
1032           except for %s, %z, and %Z, which are handled internally. Use
1033           --date=format:%c to show the date in your system locale’s preferred
1034           format. See the strftime manual for a complete list of format
1035           placeholders. When using -local, the correct syntax is
1036           --date=format-local:....
1037
1038           --date=default is the default format, and is similar to
1039           --date=rfc2822, with a few exceptions:
1040
1041           •   there is no comma after the day-of-week
1042
1043           •   the time zone is omitted when the local time zone is used
1044
1045       --parents
1046           Print also the parents of the commit (in the form "commit parent...
1047           "). Also enables parent rewriting, see History Simplification
1048           above.
1049
1050       --children
1051           Print also the children of the commit (in the form "commit child...
1052           "). Also enables parent rewriting, see History Simplification
1053           above.
1054
1055       --left-right
1056           Mark which side of a symmetric difference a commit is reachable
1057           from. Commits from the left side are prefixed with < and those from
1058           the right with >. If combined with --boundary, those commits are
1059           prefixed with -.
1060
1061           For example, if you have this topology:
1062
1063                            y---b---b  branch B
1064                           / \ /
1065                          /   .
1066                         /   / \
1067                        o---x---a---a  branch A
1068
1069           you would get an output like this:
1070
1071                       $ git rev-list --left-right --boundary --pretty=oneline A...B
1072
1073                       >bbbbbbb... 3rd on b
1074                       >bbbbbbb... 2nd on b
1075                       <aaaaaaa... 3rd on a
1076                       <aaaaaaa... 2nd on a
1077                       -yyyyyyy... 1st on b
1078                       -xxxxxxx... 1st on a
1079
1080       --graph
1081           Draw a text-based graphical representation of the commit history on
1082           the left hand side of the output. This may cause extra lines to be
1083           printed in between commits, in order for the graph history to be
1084           drawn properly. Cannot be combined with --no-walk.
1085
1086           This enables parent rewriting, see History Simplification above.
1087
1088           This implies the --topo-order option by default, but the
1089           --date-order option may also be specified.
1090
1091       --show-linear-break[=<barrier>]
1092           When --graph is not used, all history branches are flattened which
1093           can make it hard to see that the two consecutive commits do not
1094           belong to a linear branch. This option puts a barrier in between
1095           them in that case. If <barrier> is specified, it is the string that
1096           will be shown instead of the default one.
1097

PRETTY FORMATS

1099       If the commit is a merge, and if the pretty-format is not oneline,
1100       email or raw, an additional line is inserted before the Author: line.
1101       This line begins with "Merge: " and the hashes of ancestral commits are
1102       printed, separated by spaces. Note that the listed commits may not
1103       necessarily be the list of the direct parent commits if you have
1104       limited your view of history: for example, if you are only interested
1105       in changes related to a certain directory or file.
1106
1107       There are several built-in formats, and you can define additional
1108       formats by setting a pretty.<name> config option to either another
1109       format name, or a format: string, as described below (see git-
1110       config(1)). Here are the details of the built-in formats:
1111
1112oneline
1113
1114               <hash> <title-line>
1115
1116           This is designed to be as compact as possible.
1117
1118short
1119
1120               commit <hash>
1121               Author: <author>
1122
1123               <title-line>
1124
1125medium
1126
1127               commit <hash>
1128               Author: <author>
1129               Date:   <author-date>
1130
1131               <title-line>
1132
1133               <full-commit-message>
1134
1135full
1136
1137               commit <hash>
1138               Author: <author>
1139               Commit: <committer>
1140
1141               <title-line>
1142
1143               <full-commit-message>
1144
1145fuller
1146
1147               commit <hash>
1148               Author:     <author>
1149               AuthorDate: <author-date>
1150               Commit:     <committer>
1151               CommitDate: <committer-date>
1152
1153               <title-line>
1154
1155               <full-commit-message>
1156
1157reference
1158
1159               <abbrev-hash> (<title-line>, <short-author-date>)
1160
1161           This format is used to refer to another commit in a commit message
1162           and is the same as --pretty='format:%C(auto)%h (%s, %ad)'. By
1163           default, the date is formatted with --date=short unless another
1164           --date option is explicitly specified. As with any format: with
1165           format placeholders, its output is not affected by other options
1166           like --decorate and --walk-reflogs.
1167
1168email
1169
1170               From <hash> <date>
1171               From: <author>
1172               Date: <author-date>
1173               Subject: [PATCH] <title-line>
1174
1175               <full-commit-message>
1176
1177mboxrd
1178
1179           Like email, but lines in the commit message starting with "From "
1180           (preceded by zero or more ">") are quoted with ">" so they aren’t
1181           confused as starting a new commit.
1182
1183raw
1184
1185           The raw format shows the entire commit exactly as stored in the
1186           commit object. Notably, the hashes are displayed in full,
1187           regardless of whether --abbrev or --no-abbrev are used, and parents
1188           information show the true parent commits, without taking grafts or
1189           history simplification into account. Note that this format affects
1190           the way commits are displayed, but not the way the diff is shown
1191           e.g. with git log --raw. To get full object names in a raw diff
1192           format, use --no-abbrev.
1193
1194format:<format-string>
1195
1196           The format:<format-string> format allows you to specify which
1197           information you want to show. It works a little bit like printf
1198           format, with the notable exception that you get a newline with %n
1199           instead of \n.
1200
1201           E.g, format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"
1202           would show something like this:
1203
1204               The author of fe6e0ee was Junio C Hamano, 23 hours ago
1205               The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
1206
1207           The placeholders are:
1208
1209           •   Placeholders that expand to a single literal character:
1210
1211               %n
1212                   newline
1213
1214               %%
1215                   a raw %
1216
1217               %x00
1218                   print a byte from a hex code
1219
1220           •   Placeholders that affect formatting of later placeholders:
1221
1222               %Cred
1223                   switch color to red
1224
1225               %Cgreen
1226                   switch color to green
1227
1228               %Cblue
1229                   switch color to blue
1230
1231               %Creset
1232                   reset color
1233
1234               %C(...)
1235                   color specification, as described under Values in the
1236                   "CONFIGURATION FILE" section of git-config(1). By default,
1237                   colors are shown only when enabled for log output (by
1238                   color.diff, color.ui, or --color, and respecting the auto
1239                   settings of the former if we are going to a terminal).
1240                   %C(auto,...)  is accepted as a historical synonym for the
1241                   default (e.g., %C(auto,red)). Specifying %C(always,...)
1242                   will show the colors even when color is not otherwise
1243                   enabled (though consider just using --color=always to
1244                   enable color for the whole output, including this format
1245                   and anything else git might color).  auto alone (i.e.
1246                   %C(auto)) will turn on auto coloring on the next
1247                   placeholders until the color is switched again.
1248
1249               %m
1250                   left (<), right (>) or boundary (-) mark
1251
1252               %w([<w>[,<i1>[,<i2>]]])
1253                   switch line wrapping, like the -w option of git-
1254                   shortlog(1).
1255
1256               %<(<N>[,trunc|ltrunc|mtrunc])
1257                   make the next placeholder take at least N columns, padding
1258                   spaces on the right if necessary. Optionally truncate at
1259                   the beginning (ltrunc), the middle (mtrunc) or the end
1260                   (trunc) if the output is longer than N columns. Note that
1261                   truncating only works correctly with N >= 2.
1262
1263               %<|(<N>)
1264                   make the next placeholder take at least until Nth columns,
1265                   padding spaces on the right if necessary
1266
1267               %>(<N>), %>|(<N>)
1268                   similar to %<(<N>), %<|(<N>) respectively, but padding
1269                   spaces on the left
1270
1271               %>>(<N>), %>>|(<N>)
1272                   similar to %>(<N>), %>|(<N>) respectively, except that if
1273                   the next placeholder takes more spaces than given and there
1274                   are spaces on its left, use those spaces
1275
1276               %><(<N>), %><|(<N>)
1277                   similar to %<(<N>), %<|(<N>) respectively, but padding both
1278                   sides (i.e. the text is centered)
1279
1280           •   Placeholders that expand to information extracted from the
1281               commit:
1282
1283               %H
1284                   commit hash
1285
1286               %h
1287                   abbreviated commit hash
1288
1289               %T
1290                   tree hash
1291
1292               %t
1293                   abbreviated tree hash
1294
1295               %P
1296                   parent hashes
1297
1298               %p
1299                   abbreviated parent hashes
1300
1301               %an
1302                   author name
1303
1304               %aN
1305                   author name (respecting .mailmap, see git-shortlog(1) or
1306                   git-blame(1))
1307
1308               %ae
1309                   author email
1310
1311               %aE
1312                   author email (respecting .mailmap, see git-shortlog(1) or
1313                   git-blame(1))
1314
1315               %al
1316                   author email local-part (the part before the @ sign)
1317
1318               %aL
1319                   author local-part (see %al) respecting .mailmap, see git-
1320                   shortlog(1) or git-blame(1))
1321
1322               %ad
1323                   author date (format respects --date= option)
1324
1325               %aD
1326                   author date, RFC2822 style
1327
1328               %ar
1329                   author date, relative
1330
1331               %at
1332                   author date, UNIX timestamp
1333
1334               %ai
1335                   author date, ISO 8601-like format
1336
1337               %aI
1338                   author date, strict ISO 8601 format
1339
1340               %as
1341                   author date, short format (YYYY-MM-DD)
1342
1343               %ah
1344                   author date, human style (like the --date=human option of
1345                   git-rev-list(1))
1346
1347               %cn
1348                   committer name
1349
1350               %cN
1351                   committer name (respecting .mailmap, see git-shortlog(1) or
1352                   git-blame(1))
1353
1354               %ce
1355                   committer email
1356
1357               %cE
1358                   committer email (respecting .mailmap, see git-shortlog(1)
1359                   or git-blame(1))
1360
1361               %cl
1362                   committer email local-part (the part before the @ sign)
1363
1364               %cL
1365                   committer local-part (see %cl) respecting .mailmap, see
1366                   git-shortlog(1) or git-blame(1))
1367
1368               %cd
1369                   committer date (format respects --date= option)
1370
1371               %cD
1372                   committer date, RFC2822 style
1373
1374               %cr
1375                   committer date, relative
1376
1377               %ct
1378                   committer date, UNIX timestamp
1379
1380               %ci
1381                   committer date, ISO 8601-like format
1382
1383               %cI
1384                   committer date, strict ISO 8601 format
1385
1386               %cs
1387                   committer date, short format (YYYY-MM-DD)
1388
1389               %ch
1390                   committer date, human style (like the --date=human option
1391                   of git-rev-list(1))
1392
1393               %d
1394                   ref names, like the --decorate option of git-log(1)
1395
1396               %D
1397                   ref names without the " (", ")" wrapping.
1398
1399               %(describe[:options])
1400                   human-readable name, like git-describe(1); empty string for
1401                   undescribable commits. The describe string may be followed
1402                   by a colon and zero or more comma-separated options.
1403                   Descriptions can be inconsistent when tags are added or
1404                   removed at the same time.
1405
1406tags[=<bool-value>]: Instead of only considering
1407                       annotated tags, consider lightweight tags as well.
1408
1409abbrev=<number>: Instead of using the default number of
1410                       hexadecimal digits (which will vary according to the
1411                       number of objects in the repository with a default of
1412                       7) of the abbreviated object name, use <number> digits,
1413                       or as many digits as needed to form a unique object
1414                       name.
1415
1416match=<pattern>: Only consider tags matching the given
1417                       glob(7) pattern, excluding the "refs/tags/" prefix.
1418
1419exclude=<pattern>: Do not consider tags matching the
1420                       given glob(7) pattern, excluding the "refs/tags/"
1421                       prefix.
1422
1423               %S
1424                   ref name given on the command line by which the commit was
1425                   reached (like git log --source), only works with git log
1426
1427               %e
1428                   encoding
1429
1430               %s
1431                   subject
1432
1433               %f
1434                   sanitized subject line, suitable for a filename
1435
1436               %b
1437                   body
1438
1439               %B
1440                   raw body (unwrapped subject and body)
1441
1442               %N
1443                   commit notes
1444
1445               %GG
1446                   raw verification message from GPG for a signed commit
1447
1448               %G?
1449                   show "G" for a good (valid) signature, "B" for a bad
1450                   signature, "U" for a good signature with unknown validity,
1451                   "X" for a good signature that has expired, "Y" for a good
1452                   signature made by an expired key, "R" for a good signature
1453                   made by a revoked key, "E" if the signature cannot be
1454                   checked (e.g. missing key) and "N" for no signature
1455
1456               %GS
1457                   show the name of the signer for a signed commit
1458
1459               %GK
1460                   show the key used to sign a signed commit
1461
1462               %GF
1463                   show the fingerprint of the key used to sign a signed
1464                   commit
1465
1466               %GP
1467                   show the fingerprint of the primary key whose subkey was
1468                   used to sign a signed commit
1469
1470               %GT
1471                   show the trust level for the key used to sign a signed
1472                   commit
1473
1474               %gD
1475                   reflog selector, e.g., refs/stash@{1} or refs/stash@{2
1476                   minutes ago}; the format follows the rules described for
1477                   the -g option. The portion before the @ is the refname as
1478                   given on the command line (so git log -g refs/heads/master
1479                   would yield refs/heads/master@{0}).
1480
1481               %gd
1482                   shortened reflog selector; same as %gD, but the refname
1483                   portion is shortened for human readability (so
1484                   refs/heads/master becomes just master).
1485
1486               %gn
1487                   reflog identity name
1488
1489               %gN
1490                   reflog identity name (respecting .mailmap, see git-
1491                   shortlog(1) or git-blame(1))
1492
1493               %ge
1494                   reflog identity email
1495
1496               %gE
1497                   reflog identity email (respecting .mailmap, see git-
1498                   shortlog(1) or git-blame(1))
1499
1500               %gs
1501                   reflog subject
1502
1503               %(trailers[:options])
1504                   display the trailers of the body as interpreted by git-
1505                   interpret-trailers(1). The trailers string may be followed
1506                   by a colon and zero or more comma-separated options. If any
1507                   option is provided multiple times the last occurrence wins.
1508
1509key=<key>: only show trailers with specified <key>.
1510                       Matching is done case-insensitively and trailing colon
1511                       is optional. If option is given multiple times trailer
1512                       lines matching any of the keys are shown. This option
1513                       automatically enables the only option so that
1514                       non-trailer lines in the trailer block are hidden. If
1515                       that is not desired it can be disabled with only=false.
1516                       E.g., %(trailers:key=Reviewed-by) shows trailer lines
1517                       with key Reviewed-by.
1518
1519only[=<bool>]: select whether non-trailer lines from
1520                       the trailer block should be included.
1521
1522separator=<sep>: specify a separator inserted between
1523                       trailer lines. When this option is not given each
1524                       trailer line is terminated with a line feed character.
1525                       The string <sep> may contain the literal formatting
1526                       codes described above. To use comma as separator one
1527                       must use %x2C as it would otherwise be parsed as next
1528                       option. E.g., %(trailers:key=Ticket,separator=%x2C )
1529                       shows all trailer lines whose key is "Ticket" separated
1530                       by a comma and a space.
1531
1532unfold[=<bool>]: make it behave as if
1533                       interpret-trailer’s --unfold option was given. E.g.,
1534                       %(trailers:only,unfold=true) unfolds and shows all
1535                       trailer lines.
1536
1537keyonly[=<bool>]: only show the key part of the
1538                       trailer.
1539
1540valueonly[=<bool>]: only show the value part of the
1541                       trailer.
1542
1543key_value_separator=<sep>: specify a separator inserted
1544                       between trailer lines. When this option is not given
1545                       each trailer key-value pair is separated by ": ".
1546                       Otherwise it shares the same semantics as
1547                       separator=<sep> above.
1548
1549           Note
1550           Some placeholders may depend on other options given to the revision
1551           traversal engine. For example, the %g* reflog options will insert
1552           an empty string unless we are traversing reflog entries (e.g., by
1553           git log -g). The %d and %D placeholders will use the "short"
1554           decoration format if --decorate was not already provided on the
1555           command line.
1556
1557       The boolean options accept an optional value [=<bool-value>]. The
1558       values true, false, on, off etc. are all accepted. See the "boolean"
1559       sub-section in "EXAMPLES" in git-config(1). If a boolean option is
1560       given with no value, it’s enabled.
1561
1562       If you add a + (plus sign) after % of a placeholder, a line-feed is
1563       inserted immediately before the expansion if and only if the
1564       placeholder expands to a non-empty string.
1565
1566       If you add a - (minus sign) after % of a placeholder, all consecutive
1567       line-feeds immediately preceding the expansion are deleted if and only
1568       if the placeholder expands to an empty string.
1569
1570       If you add a ` ` (space) after % of a placeholder, a space is inserted
1571       immediately before the expansion if and only if the placeholder expands
1572       to a non-empty string.
1573
1574tformat:
1575
1576           The tformat: format works exactly like format:, except that it
1577           provides "terminator" semantics instead of "separator" semantics.
1578           In other words, each commit has the message terminator character
1579           (usually a newline) appended, rather than a separator placed
1580           between entries. This means that the final entry of a single-line
1581           format will be properly terminated with a new line, just as the
1582           "oneline" format does. For example:
1583
1584               $ git log -2 --pretty=format:%h 4da45bef \
1585                 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1586               4da45be
1587               7134973 -- NO NEWLINE
1588
1589               $ git log -2 --pretty=tformat:%h 4da45bef \
1590                 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1591               4da45be
1592               7134973
1593
1594           In addition, any unrecognized string that has a % in it is
1595           interpreted as if it has tformat: in front of it. For example,
1596           these two are equivalent:
1597
1598               $ git log -2 --pretty=tformat:%h 4da45bef
1599               $ git log -2 --pretty=%h 4da45bef
1600

DIFF FORMATTING

1602       By default, git log does not generate any diff output. The options
1603       below can be used to show the changes made by each commit.
1604
1605       Note that unless one of --diff-merges variants (including short -m, -c,
1606       and --cc options) is explicitly given, merge commits will not show a
1607       diff, even if a diff format like --patch is selected, nor will they
1608       match search options like -S. The exception is when --first-parent is
1609       in use, in which case first-parent is the default format.
1610
1611       -p, -u, --patch
1612           Generate patch (see section on generating patches).
1613
1614       -s, --no-patch
1615           Suppress diff output. Useful for commands like git show that show
1616           the patch by default, or to cancel the effect of --patch.
1617
1618       --diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc|remerge|r),
1619       --no-diff-merges
1620           Specify diff format to be used for merge commits. Default is `off`
1621           unless --first-parent is in use, in which case first-parent is the
1622           default.
1623
1624           --diff-merges=(off|none), --no-diff-merges
1625               Disable output of diffs for merge commits. Useful to override
1626               implied value.
1627
1628           --diff-merges=on, --diff-merges=m, -m
1629               This option makes diff output for merge commits to be shown in
1630               the default format.  -m will produce the output only if -p is
1631               given as well. The default format could be changed using
1632               log.diffMerges configuration parameter, which default value is
1633               separate.
1634
1635           --diff-merges=first-parent, --diff-merges=1
1636               This option makes merge commits show the full diff with respect
1637               to the first parent only.
1638
1639           --diff-merges=separate
1640               This makes merge commits show the full diff with respect to
1641               each of the parents. Separate log entry and diff is generated
1642               for each parent.
1643
1644           --diff-merges=remerge, --diff-merges=r, --remerge-diff
1645               With this option, two-parent merge commits are remerged to
1646               create a temporary tree object — potentially containing files
1647               with conflict markers and such. A diff is then shown between
1648               that temporary tree and the actual merge commit.
1649
1650               The output emitted when this option is used is subject to
1651               change, and so is its interaction with other options (unless
1652               explicitly documented).
1653
1654           --diff-merges=combined, --diff-merges=c, -c
1655               With this option, diff output for a merge commit shows the
1656               differences from each of the parents to the merge result
1657               simultaneously instead of showing pairwise diff between a
1658               parent and the result one at a time. Furthermore, it lists only
1659               files which were modified from all parents.  -c implies -p.
1660
1661           --diff-merges=dense-combined, --diff-merges=cc, --cc
1662               With this option the output produced by --diff-merges=combined
1663               is further compressed by omitting uninteresting hunks whose
1664               contents in the parents have only two variants and the merge
1665               result picks one of them without modification.  --cc implies
1666               -p.
1667
1668       --combined-all-paths
1669           This flag causes combined diffs (used for merge commits) to list
1670           the name of the file from all parents. It thus only has effect when
1671           --diff-merges=[dense-]combined is in use, and is likely only useful
1672           if filename changes are detected (i.e. when either rename or copy
1673           detection have been requested).
1674
1675       -U<n>, --unified=<n>
1676           Generate diffs with <n> lines of context instead of the usual
1677           three. Implies --patch.
1678
1679       --output=<file>
1680           Output to a specific file instead of stdout.
1681
1682       --output-indicator-new=<char>, --output-indicator-old=<char>,
1683       --output-indicator-context=<char>
1684           Specify the character used to indicate new, old or context lines in
1685           the generated patch. Normally they are +, - and ' ' respectively.
1686
1687       --raw
1688           For each commit, show a summary of changes using the raw diff
1689           format. See the "RAW OUTPUT FORMAT" section of git-diff(1). This is
1690           different from showing the log itself in raw format, which you can
1691           achieve with --format=raw.
1692
1693       --patch-with-raw
1694           Synonym for -p --raw.
1695
1696       -t
1697           Show the tree objects in the diff output.
1698
1699       --indent-heuristic
1700           Enable the heuristic that shifts diff hunk boundaries to make
1701           patches easier to read. This is the default.
1702
1703       --no-indent-heuristic
1704           Disable the indent heuristic.
1705
1706       --minimal
1707           Spend extra time to make sure the smallest possible diff is
1708           produced.
1709
1710       --patience
1711           Generate a diff using the "patience diff" algorithm.
1712
1713       --histogram
1714           Generate a diff using the "histogram diff" algorithm.
1715
1716       --anchored=<text>
1717           Generate a diff using the "anchored diff" algorithm.
1718
1719           This option may be specified more than once.
1720
1721           If a line exists in both the source and destination, exists only
1722           once, and starts with this text, this algorithm attempts to prevent
1723           it from appearing as a deletion or addition in the output. It uses
1724           the "patience diff" algorithm internally.
1725
1726       --diff-algorithm={patience|minimal|histogram|myers}
1727           Choose a diff algorithm. The variants are as follows:
1728
1729           default, myers
1730               The basic greedy diff algorithm. Currently, this is the
1731               default.
1732
1733           minimal
1734               Spend extra time to make sure the smallest possible diff is
1735               produced.
1736
1737           patience
1738               Use "patience diff" algorithm when generating patches.
1739
1740           histogram
1741               This algorithm extends the patience algorithm to "support
1742               low-occurrence common elements".
1743
1744           For instance, if you configured the diff.algorithm variable to a
1745           non-default value and want to use the default one, then you have to
1746           use --diff-algorithm=default option.
1747
1748       --stat[=<width>[,<name-width>[,<count>]]]
1749           Generate a diffstat. By default, as much space as necessary will be
1750           used for the filename part, and the rest for the graph part.
1751           Maximum width defaults to terminal width, or 80 columns if not
1752           connected to a terminal, and can be overridden by <width>. The
1753           width of the filename part can be limited by giving another width
1754           <name-width> after a comma. The width of the graph part can be
1755           limited by using --stat-graph-width=<width> (affects all commands
1756           generating a stat graph) or by setting diff.statGraphWidth=<width>
1757           (does not affect git format-patch). By giving a third parameter
1758           <count>, you can limit the output to the first <count> lines,
1759           followed by ...  if there are more.
1760
1761           These parameters can also be set individually with
1762           --stat-width=<width>, --stat-name-width=<name-width> and
1763           --stat-count=<count>.
1764
1765       --compact-summary
1766           Output a condensed summary of extended header information such as
1767           file creations or deletions ("new" or "gone", optionally "+l" if
1768           it’s a symlink) and mode changes ("+x" or "-x" for adding or
1769           removing executable bit respectively) in diffstat. The information
1770           is put between the filename part and the graph part. Implies
1771           --stat.
1772
1773       --numstat
1774           Similar to --stat, but shows number of added and deleted lines in
1775           decimal notation and pathname without abbreviation, to make it more
1776           machine friendly. For binary files, outputs two - instead of saying
1777           0 0.
1778
1779       --shortstat
1780           Output only the last line of the --stat format containing total
1781           number of modified files, as well as number of added and deleted
1782           lines.
1783
1784       -X[<param1,param2,...>], --dirstat[=<param1,param2,...>]
1785           Output the distribution of relative amount of changes for each
1786           sub-directory. The behavior of --dirstat can be customized by
1787           passing it a comma separated list of parameters. The defaults are
1788           controlled by the diff.dirstat configuration variable (see git-
1789           config(1)). The following parameters are available:
1790
1791           changes
1792               Compute the dirstat numbers by counting the lines that have
1793               been removed from the source, or added to the destination. This
1794               ignores the amount of pure code movements within a file. In
1795               other words, rearranging lines in a file is not counted as much
1796               as other changes. This is the default behavior when no
1797               parameter is given.
1798
1799           lines
1800               Compute the dirstat numbers by doing the regular line-based
1801               diff analysis, and summing the removed/added line counts. (For
1802               binary files, count 64-byte chunks instead, since binary files
1803               have no natural concept of lines). This is a more expensive
1804               --dirstat behavior than the changes behavior, but it does count
1805               rearranged lines within a file as much as other changes. The
1806               resulting output is consistent with what you get from the other
1807               --*stat options.
1808
1809           files
1810               Compute the dirstat numbers by counting the number of files
1811               changed. Each changed file counts equally in the dirstat
1812               analysis. This is the computationally cheapest --dirstat
1813               behavior, since it does not have to look at the file contents
1814               at all.
1815
1816           cumulative
1817               Count changes in a child directory for the parent directory as
1818               well. Note that when using cumulative, the sum of the
1819               percentages reported may exceed 100%. The default
1820               (non-cumulative) behavior can be specified with the
1821               noncumulative parameter.
1822
1823           <limit>
1824               An integer parameter specifies a cut-off percent (3% by
1825               default). Directories contributing less than this percentage of
1826               the changes are not shown in the output.
1827
1828           Example: The following will count changed files, while ignoring
1829           directories with less than 10% of the total amount of changed
1830           files, and accumulating child directory counts in the parent
1831           directories: --dirstat=files,10,cumulative.
1832
1833       --cumulative
1834           Synonym for --dirstat=cumulative
1835
1836       --dirstat-by-file[=<param1,param2>...]
1837           Synonym for --dirstat=files,param1,param2...
1838
1839       --summary
1840           Output a condensed summary of extended header information such as
1841           creations, renames and mode changes.
1842
1843       --patch-with-stat
1844           Synonym for -p --stat.
1845
1846       -z
1847           Separate the commits with NULs instead of with new newlines.
1848
1849           Also, when --raw or --numstat has been given, do not munge
1850           pathnames and use NULs as output field terminators.
1851
1852           Without this option, pathnames with "unusual" characters are quoted
1853           as explained for the configuration variable core.quotePath (see
1854           git-config(1)).
1855
1856       --name-only
1857           Show only names of changed files. The file names are often encoded
1858           in UTF-8. For more information see the discussion about encoding in
1859           the git-log(1) manual page.
1860
1861       --name-status
1862           Show only names and status of changed files. See the description of
1863           the --diff-filter option on what the status letters mean. Just like
1864           --name-only the file names are often encoded in UTF-8.
1865
1866       --submodule[=<format>]
1867           Specify how differences in submodules are shown. When specifying
1868           --submodule=short the short format is used. This format just shows
1869           the names of the commits at the beginning and end of the range.
1870           When --submodule or --submodule=log is specified, the log format is
1871           used. This format lists the commits in the range like git-
1872           submodule(1) summary does. When --submodule=diff is specified, the
1873           diff format is used. This format shows an inline diff of the
1874           changes in the submodule contents between the commit range.
1875           Defaults to diff.submodule or the short format if the config option
1876           is unset.
1877
1878       --color[=<when>]
1879           Show colored diff.  --color (i.e. without =<when>) is the same as
1880           --color=always.  <when> can be one of always, never, or auto.
1881
1882       --no-color
1883           Turn off colored diff. It is the same as --color=never.
1884
1885       --color-moved[=<mode>]
1886           Moved lines of code are colored differently. The <mode> defaults to
1887           no if the option is not given and to zebra if the option with no
1888           mode is given. The mode must be one of:
1889
1890           no
1891               Moved lines are not highlighted.
1892
1893           default
1894               Is a synonym for zebra. This may change to a more sensible mode
1895               in the future.
1896
1897           plain
1898               Any line that is added in one location and was removed in
1899               another location will be colored with color.diff.newMoved.
1900               Similarly color.diff.oldMoved will be used for removed lines
1901               that are added somewhere else in the diff. This mode picks up
1902               any moved line, but it is not very useful in a review to
1903               determine if a block of code was moved without permutation.
1904
1905           blocks
1906               Blocks of moved text of at least 20 alphanumeric characters are
1907               detected greedily. The detected blocks are painted using either
1908               the color.diff.{old,new}Moved color. Adjacent blocks cannot be
1909               told apart.
1910
1911           zebra
1912               Blocks of moved text are detected as in blocks mode. The blocks
1913               are painted using either the color.diff.{old,new}Moved color or
1914               color.diff.{old,new}MovedAlternative. The change between the
1915               two colors indicates that a new block was detected.
1916
1917           dimmed-zebra
1918               Similar to zebra, but additional dimming of uninteresting parts
1919               of moved code is performed. The bordering lines of two adjacent
1920               blocks are considered interesting, the rest is uninteresting.
1921               dimmed_zebra is a deprecated synonym.
1922
1923       --no-color-moved
1924           Turn off move detection. This can be used to override configuration
1925           settings. It is the same as --color-moved=no.
1926
1927       --color-moved-ws=<modes>
1928           This configures how whitespace is ignored when performing the move
1929           detection for --color-moved. These modes can be given as a comma
1930           separated list:
1931
1932           no
1933               Do not ignore whitespace when performing move detection.
1934
1935           ignore-space-at-eol
1936               Ignore changes in whitespace at EOL.
1937
1938           ignore-space-change
1939               Ignore changes in amount of whitespace. This ignores whitespace
1940               at line end, and considers all other sequences of one or more
1941               whitespace characters to be equivalent.
1942
1943           ignore-all-space
1944               Ignore whitespace when comparing lines. This ignores
1945               differences even if one line has whitespace where the other
1946               line has none.
1947
1948           allow-indentation-change
1949               Initially ignore any whitespace in the move detection, then
1950               group the moved code blocks only into a block if the change in
1951               whitespace is the same per line. This is incompatible with the
1952               other modes.
1953
1954       --no-color-moved-ws
1955           Do not ignore whitespace when performing move detection. This can
1956           be used to override configuration settings. It is the same as
1957           --color-moved-ws=no.
1958
1959       --word-diff[=<mode>]
1960           Show a word diff, using the <mode> to delimit changed words. By
1961           default, words are delimited by whitespace; see --word-diff-regex
1962           below. The <mode> defaults to plain, and must be one of:
1963
1964           color
1965               Highlight changed words using only colors. Implies --color.
1966
1967           plain
1968               Show words as [-removed-] and {+added+}. Makes no attempts to
1969               escape the delimiters if they appear in the input, so the
1970               output may be ambiguous.
1971
1972           porcelain
1973               Use a special line-based format intended for script
1974               consumption. Added/removed/unchanged runs are printed in the
1975               usual unified diff format, starting with a +/-/` ` character at
1976               the beginning of the line and extending to the end of the line.
1977               Newlines in the input are represented by a tilde ~ on a line of
1978               its own.
1979
1980           none
1981               Disable word diff again.
1982
1983           Note that despite the name of the first mode, color is used to
1984           highlight the changed parts in all modes if enabled.
1985
1986       --word-diff-regex=<regex>
1987           Use <regex> to decide what a word is, instead of considering runs
1988           of non-whitespace to be a word. Also implies --word-diff unless it
1989           was already enabled.
1990
1991           Every non-overlapping match of the <regex> is considered a word.
1992           Anything between these matches is considered whitespace and
1993           ignored(!) for the purposes of finding differences. You may want to
1994           append |[^[:space:]] to your regular expression to make sure that
1995           it matches all non-whitespace characters. A match that contains a
1996           newline is silently truncated(!) at the newline.
1997
1998           For example, --word-diff-regex=.  will treat each character as a
1999           word and, correspondingly, show differences character by character.
2000
2001           The regex can also be set via a diff driver or configuration
2002           option, see gitattributes(5) or git-config(1). Giving it explicitly
2003           overrides any diff driver or configuration setting. Diff drivers
2004           override configuration settings.
2005
2006       --color-words[=<regex>]
2007           Equivalent to --word-diff=color plus (if a regex was specified)
2008           --word-diff-regex=<regex>.
2009
2010       --no-renames
2011           Turn off rename detection, even when the configuration file gives
2012           the default to do so.
2013
2014       --[no-]rename-empty
2015           Whether to use empty blobs as rename source.
2016
2017       --check
2018           Warn if changes introduce conflict markers or whitespace errors.
2019           What are considered whitespace errors is controlled by
2020           core.whitespace configuration. By default, trailing whitespaces
2021           (including lines that consist solely of whitespaces) and a space
2022           character that is immediately followed by a tab character inside
2023           the initial indent of the line are considered whitespace errors.
2024           Exits with non-zero status if problems are found. Not compatible
2025           with --exit-code.
2026
2027       --ws-error-highlight=<kind>
2028           Highlight whitespace errors in the context, old or new lines of the
2029           diff. Multiple values are separated by comma, none resets previous
2030           values, default reset the list to new and all is a shorthand for
2031           old,new,context. When this option is not given, and the
2032           configuration variable diff.wsErrorHighlight is not set, only
2033           whitespace errors in new lines are highlighted. The whitespace
2034           errors are colored with color.diff.whitespace.
2035
2036       --full-index
2037           Instead of the first handful of characters, show the full pre- and
2038           post-image blob object names on the "index" line when generating
2039           patch format output.
2040
2041       --binary
2042           In addition to --full-index, output a binary diff that can be
2043           applied with git-apply. Implies --patch.
2044
2045       --abbrev[=<n>]
2046           Instead of showing the full 40-byte hexadecimal object name in
2047           diff-raw format output and diff-tree header lines, show the
2048           shortest prefix that is at least <n> hexdigits long that uniquely
2049           refers the object. In diff-patch output format, --full-index takes
2050           higher precedence, i.e. if --full-index is specified, full blob
2051           names will be shown regardless of --abbrev. Non default number of
2052           digits can be specified with --abbrev=<n>.
2053
2054       -B[<n>][/<m>], --break-rewrites[=[<n>][/<m>]]
2055           Break complete rewrite changes into pairs of delete and create.
2056           This serves two purposes:
2057
2058           It affects the way a change that amounts to a total rewrite of a
2059           file not as a series of deletion and insertion mixed together with
2060           a very few lines that happen to match textually as the context, but
2061           as a single deletion of everything old followed by a single
2062           insertion of everything new, and the number m controls this aspect
2063           of the -B option (defaults to 60%).  -B/70% specifies that less
2064           than 30% of the original should remain in the result for Git to
2065           consider it a total rewrite (i.e. otherwise the resulting patch
2066           will be a series of deletion and insertion mixed together with
2067           context lines).
2068
2069           When used with -M, a totally-rewritten file is also considered as
2070           the source of a rename (usually -M only considers a file that
2071           disappeared as the source of a rename), and the number n controls
2072           this aspect of the -B option (defaults to 50%).  -B20% specifies
2073           that a change with addition and deletion compared to 20% or more of
2074           the file’s size are eligible for being picked up as a possible
2075           source of a rename to another file.
2076
2077       -M[<n>], --find-renames[=<n>]
2078           If generating diffs, detect and report renames for each commit. For
2079           following files across renames while traversing history, see
2080           --follow. If n is specified, it is a threshold on the similarity
2081           index (i.e. amount of addition/deletions compared to the file’s
2082           size). For example, -M90% means Git should consider a delete/add
2083           pair to be a rename if more than 90% of the file hasn’t changed.
2084           Without a % sign, the number is to be read as a fraction, with a
2085           decimal point before it. I.e., -M5 becomes 0.5, and is thus the
2086           same as -M50%. Similarly, -M05 is the same as -M5%. To limit
2087           detection to exact renames, use -M100%. The default similarity
2088           index is 50%.
2089
2090       -C[<n>], --find-copies[=<n>]
2091           Detect copies as well as renames. See also --find-copies-harder. If
2092           n is specified, it has the same meaning as for -M<n>.
2093
2094       --find-copies-harder
2095           For performance reasons, by default, -C option finds copies only if
2096           the original file of the copy was modified in the same changeset.
2097           This flag makes the command inspect unmodified files as candidates
2098           for the source of copy. This is a very expensive operation for
2099           large projects, so use it with caution. Giving more than one -C
2100           option has the same effect.
2101
2102       -D, --irreversible-delete
2103           Omit the preimage for deletes, i.e. print only the header but not
2104           the diff between the preimage and /dev/null. The resulting patch is
2105           not meant to be applied with patch or git apply; this is solely for
2106           people who want to just concentrate on reviewing the text after the
2107           change. In addition, the output obviously lacks enough information
2108           to apply such a patch in reverse, even manually, hence the name of
2109           the option.
2110
2111           When used together with -B, omit also the preimage in the deletion
2112           part of a delete/create pair.
2113
2114       -l<num>
2115           The -M and -C options involve some preliminary steps that can
2116           detect subsets of renames/copies cheaply, followed by an exhaustive
2117           fallback portion that compares all remaining unpaired destinations
2118           to all relevant sources. (For renames, only remaining unpaired
2119           sources are relevant; for copies, all original sources are
2120           relevant.) For N sources and destinations, this exhaustive check is
2121           O(N^2). This option prevents the exhaustive portion of rename/copy
2122           detection from running if the number of source/destination files
2123           involved exceeds the specified number. Defaults to
2124           diff.renameLimit. Note that a value of 0 is treated as unlimited.
2125
2126       --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
2127           Select only files that are Added (A), Copied (C), Deleted (D),
2128           Modified (M), Renamed (R), have their type (i.e. regular file,
2129           symlink, submodule, ...) changed (T), are Unmerged (U), are Unknown
2130           (X), or have had their pairing Broken (B). Any combination of the
2131           filter characters (including none) can be used. When *
2132           (All-or-none) is added to the combination, all paths are selected
2133           if there is any file that matches other criteria in the comparison;
2134           if there is no file that matches other criteria, nothing is
2135           selected.
2136
2137           Also, these upper-case letters can be downcased to exclude. E.g.
2138           --diff-filter=ad excludes added and deleted paths.
2139
2140           Note that not all diffs can feature all types. For instance, copied
2141           and renamed entries cannot appear if detection for those types is
2142           disabled.
2143
2144       -S<string>
2145           Look for differences that change the number of occurrences of the
2146           specified string (i.e. addition/deletion) in a file. Intended for
2147           the scripter’s use.
2148
2149           It is useful when you’re looking for an exact block of code (like a
2150           struct), and want to know the history of that block since it first
2151           came into being: use the feature iteratively to feed the
2152           interesting block in the preimage back into -S, and keep going
2153           until you get the very first version of the block.
2154
2155           Binary files are searched as well.
2156
2157       -G<regex>
2158           Look for differences whose patch text contains added/removed lines
2159           that match <regex>.
2160
2161           To illustrate the difference between -S<regex> --pickaxe-regex and
2162           -G<regex>, consider a commit with the following diff in the same
2163           file:
2164
2165               +    return frotz(nitfol, two->ptr, 1, 0);
2166               ...
2167               -    hit = frotz(nitfol, mf2.ptr, 1, 0);
2168
2169           While git log -G"frotz\(nitfol" will show this commit, git log
2170           -S"frotz\(nitfol" --pickaxe-regex will not (because the number of
2171           occurrences of that string did not change).
2172
2173           Unless --text is supplied patches of binary files without a
2174           textconv filter will be ignored.
2175
2176           See the pickaxe entry in gitdiffcore(7) for more information.
2177
2178       --find-object=<object-id>
2179           Look for differences that change the number of occurrences of the
2180           specified object. Similar to -S, just the argument is different in
2181           that it doesn’t search for a specific string but for a specific
2182           object id.
2183
2184           The object can be a blob or a submodule commit. It implies the -t
2185           option in git-log to also find trees.
2186
2187       --pickaxe-all
2188           When -S or -G finds a change, show all the changes in that
2189           changeset, not just the files that contain the change in <string>.
2190
2191       --pickaxe-regex
2192           Treat the <string> given to -S as an extended POSIX regular
2193           expression to match.
2194
2195       -O<orderfile>
2196           Control the order in which files appear in the output. This
2197           overrides the diff.orderFile configuration variable (see git-
2198           config(1)). To cancel diff.orderFile, use -O/dev/null.
2199
2200           The output order is determined by the order of glob patterns in
2201           <orderfile>. All files with pathnames that match the first pattern
2202           are output first, all files with pathnames that match the second
2203           pattern (but not the first) are output next, and so on. All files
2204           with pathnames that do not match any pattern are output last, as if
2205           there was an implicit match-all pattern at the end of the file. If
2206           multiple pathnames have the same rank (they match the same pattern
2207           but no earlier patterns), their output order relative to each other
2208           is the normal order.
2209
2210           <orderfile> is parsed as follows:
2211
2212           •   Blank lines are ignored, so they can be used as separators for
2213               readability.
2214
2215           •   Lines starting with a hash ("#") are ignored, so they can be
2216               used for comments. Add a backslash ("\") to the beginning of
2217               the pattern if it starts with a hash.
2218
2219           •   Each other line contains a single pattern.
2220
2221           Patterns have the same syntax and semantics as patterns used for
2222           fnmatch(3) without the FNM_PATHNAME flag, except a pathname also
2223           matches a pattern if removing any number of the final pathname
2224           components matches the pattern. For example, the pattern "foo*bar"
2225           matches "fooasdfbar" and "foo/bar/baz/asdf" but not "foobarx".
2226
2227       --skip-to=<file>, --rotate-to=<file>
2228           Discard the files before the named <file> from the output (i.e.
2229           skip to), or move them to the end of the output (i.e.  rotate to).
2230           These were invented primarily for use of the git difftool command,
2231           and may not be very useful otherwise.
2232
2233       -R
2234           Swap two inputs; that is, show differences from index or on-disk
2235           file to tree contents.
2236
2237       --relative[=<path>], --no-relative
2238           When run from a subdirectory of the project, it can be told to
2239           exclude changes outside the directory and show pathnames relative
2240           to it with this option. When you are not in a subdirectory (e.g. in
2241           a bare repository), you can name which subdirectory to make the
2242           output relative to by giving a <path> as an argument.
2243           --no-relative can be used to countermand both diff.relative config
2244           option and previous --relative.
2245
2246       -a, --text
2247           Treat all files as text.
2248
2249       --ignore-cr-at-eol
2250           Ignore carriage-return at the end of line when doing a comparison.
2251
2252       --ignore-space-at-eol
2253           Ignore changes in whitespace at EOL.
2254
2255       -b, --ignore-space-change
2256           Ignore changes in amount of whitespace. This ignores whitespace at
2257           line end, and considers all other sequences of one or more
2258           whitespace characters to be equivalent.
2259
2260       -w, --ignore-all-space
2261           Ignore whitespace when comparing lines. This ignores differences
2262           even if one line has whitespace where the other line has none.
2263
2264       --ignore-blank-lines
2265           Ignore changes whose lines are all blank.
2266
2267       -I<regex>, --ignore-matching-lines=<regex>
2268           Ignore changes whose all lines match <regex>. This option may be
2269           specified more than once.
2270
2271       --inter-hunk-context=<lines>
2272           Show the context between diff hunks, up to the specified number of
2273           lines, thereby fusing hunks that are close to each other. Defaults
2274           to diff.interHunkContext or 0 if the config option is unset.
2275
2276       -W, --function-context
2277           Show whole function as context lines for each change. The function
2278           names are determined in the same way as git diff works out patch
2279           hunk headers (see Defining a custom hunk-header in
2280           gitattributes(5)).
2281
2282       --ext-diff
2283           Allow an external diff helper to be executed. If you set an
2284           external diff driver with gitattributes(5), you need to use this
2285           option with git-log(1) and friends.
2286
2287       --no-ext-diff
2288           Disallow external diff drivers.
2289
2290       --textconv, --no-textconv
2291           Allow (or disallow) external text conversion filters to be run when
2292           comparing binary files. See gitattributes(5) for details. Because
2293           textconv filters are typically a one-way conversion, the resulting
2294           diff is suitable for human consumption, but cannot be applied. For
2295           this reason, textconv filters are enabled by default only for git-
2296           diff(1) and git-log(1), but not for git-format-patch(1) or diff
2297           plumbing commands.
2298
2299       --ignore-submodules[=<when>]
2300           Ignore changes to submodules in the diff generation. <when> can be
2301           either "none", "untracked", "dirty" or "all", which is the default.
2302           Using "none" will consider the submodule modified when it either
2303           contains untracked or modified files or its HEAD differs from the
2304           commit recorded in the superproject and can be used to override any
2305           settings of the ignore option in git-config(1) or gitmodules(5).
2306           When "untracked" is used submodules are not considered dirty when
2307           they only contain untracked content (but they are still scanned for
2308           modified content). Using "dirty" ignores all changes to the work
2309           tree of submodules, only changes to the commits stored in the
2310           superproject are shown (this was the behavior until 1.7.0). Using
2311           "all" hides all changes to submodules.
2312
2313       --src-prefix=<prefix>
2314           Show the given source prefix instead of "a/".
2315
2316       --dst-prefix=<prefix>
2317           Show the given destination prefix instead of "b/".
2318
2319       --no-prefix
2320           Do not show any source or destination prefix.
2321
2322       --line-prefix=<prefix>
2323           Prepend an additional prefix to every line of output.
2324
2325       --ita-invisible-in-index
2326           By default entries added by "git add -N" appear as an existing
2327           empty file in "git diff" and a new file in "git diff --cached".
2328           This option makes the entry appear as a new file in "git diff" and
2329           non-existent in "git diff --cached". This option could be reverted
2330           with --ita-visible-in-index. Both options are experimental and
2331           could be removed in future.
2332
2333       For more detailed explanation on these common options, see also
2334       gitdiffcore(7).
2335

GENERATING PATCH TEXT WITH -P

2337       Running git-diff(1), git-log(1), git-show(1), git-diff-index(1), git-
2338       diff-tree(1), or git-diff-files(1) with the -p option produces patch
2339       text. You can customize the creation of patch text via the
2340       GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables (see
2341       git(1)), and the diff attribute (see gitattributes(5)).
2342
2343       What the -p option produces is slightly different from the traditional
2344       diff format:
2345
2346        1. It is preceded with a "git diff" header that looks like this:
2347
2348               diff --git a/file1 b/file2
2349
2350           The a/ and b/ filenames are the same unless rename/copy is
2351           involved. Especially, even for a creation or a deletion, /dev/null
2352           is not used in place of the a/ or b/ filenames.
2353
2354           When rename/copy is involved, file1 and file2 show the name of the
2355           source file of the rename/copy and the name of the file that
2356           rename/copy produces, respectively.
2357
2358        2. It is followed by one or more extended header lines:
2359
2360               old mode <mode>
2361               new mode <mode>
2362               deleted file mode <mode>
2363               new file mode <mode>
2364               copy from <path>
2365               copy to <path>
2366               rename from <path>
2367               rename to <path>
2368               similarity index <number>
2369               dissimilarity index <number>
2370               index <hash>..<hash> <mode>
2371
2372           File modes are printed as 6-digit octal numbers including the file
2373           type and file permission bits.
2374
2375           Path names in extended headers do not include the a/ and b/
2376           prefixes.
2377
2378           The similarity index is the percentage of unchanged lines, and the
2379           dissimilarity index is the percentage of changed lines. It is a
2380           rounded down integer, followed by a percent sign. The similarity
2381           index value of 100% is thus reserved for two equal files, while
2382           100% dissimilarity means that no line from the old file made it
2383           into the new one.
2384
2385           The index line includes the blob object names before and after the
2386           change. The <mode> is included if the file mode does not change;
2387           otherwise, separate lines indicate the old and the new mode.
2388
2389        3. Pathnames with "unusual" characters are quoted as explained for the
2390           configuration variable core.quotePath (see git-config(1)).
2391
2392        4. All the file1 files in the output refer to files before the commit,
2393           and all the file2 files refer to files after the commit. It is
2394           incorrect to apply each change to each file sequentially. For
2395           example, this patch will swap a and b:
2396
2397               diff --git a/a b/b
2398               rename from a
2399               rename to b
2400               diff --git a/b b/a
2401               rename from b
2402               rename to a
2403
2404        5. Hunk headers mention the name of the function to which the hunk
2405           applies. See "Defining a custom hunk-header" in gitattributes(5)
2406           for details of how to tailor to this to specific languages.
2407

COMBINED DIFF FORMAT

2409       Any diff-generating command can take the -c or --cc option to produce a
2410       combined diff when showing a merge. This is the default format when
2411       showing merges with git-diff(1) or git-show(1). Note also that you can
2412       give suitable --diff-merges option to any of these commands to force
2413       generation of diffs in specific format.
2414
2415       A "combined diff" format looks like this:
2416
2417           diff --combined describe.c
2418           index fabadb8,cc95eb0..4866510
2419           --- a/describe.c
2420           +++ b/describe.c
2421           @@@ -98,20 -98,12 +98,20 @@@
2422                   return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
2423             }
2424
2425           - static void describe(char *arg)
2426            -static void describe(struct commit *cmit, int last_one)
2427           ++static void describe(char *arg, int last_one)
2428             {
2429            +      unsigned char sha1[20];
2430            +      struct commit *cmit;
2431                   struct commit_list *list;
2432                   static int initialized = 0;
2433                   struct commit_name *n;
2434
2435            +      if (get_sha1(arg, sha1) < 0)
2436            +              usage(describe_usage);
2437            +      cmit = lookup_commit_reference(sha1);
2438            +      if (!cmit)
2439            +              usage(describe_usage);
2440            +
2441                   if (!initialized) {
2442                           initialized = 1;
2443                           for_each_ref(get_name);
2444
2445        1. It is preceded with a "git diff" header, that looks like this (when
2446           the -c option is used):
2447
2448               diff --combined file
2449
2450           or like this (when the --cc option is used):
2451
2452               diff --cc file
2453
2454        2. It is followed by one or more extended header lines (this example
2455           shows a merge with two parents):
2456
2457               index <hash>,<hash>..<hash>
2458               mode <mode>,<mode>..<mode>
2459               new file mode <mode>
2460               deleted file mode <mode>,<mode>
2461
2462           The mode <mode>,<mode>..<mode> line appears only if at least one of
2463           the <mode> is different from the rest. Extended headers with
2464           information about detected contents movement (renames and copying
2465           detection) are designed to work with diff of two <tree-ish> and are
2466           not used by combined diff format.
2467
2468        3. It is followed by two-line from-file/to-file header
2469
2470               --- a/file
2471               +++ b/file
2472
2473           Similar to two-line header for traditional unified diff format,
2474           /dev/null is used to signal created or deleted files.
2475
2476           However, if the --combined-all-paths option is provided, instead of
2477           a two-line from-file/to-file you get a N+1 line from-file/to-file
2478           header, where N is the number of parents in the merge commit
2479
2480               --- a/file
2481               --- a/file
2482               --- a/file
2483               +++ b/file
2484
2485           This extended format can be useful if rename or copy detection is
2486           active, to allow you to see the original name of the file in
2487           different parents.
2488
2489        4. Chunk header format is modified to prevent people from accidentally
2490           feeding it to patch -p1. Combined diff format was created for
2491           review of merge commit changes, and was not meant to be applied.
2492           The change is similar to the change in the extended index header:
2493
2494               @@@ <from-file-range> <from-file-range> <to-file-range> @@@
2495
2496           There are (number of parents + 1) @ characters in the chunk header
2497           for combined diff format.
2498
2499       Unlike the traditional unified diff format, which shows two files A and
2500       B with a single column that has - (minus — appears in A but removed in
2501       B), + (plus — missing in A but added to B), or " " (space — unchanged)
2502       prefix, this format compares two or more files file1, file2,... with
2503       one file X, and shows how X differs from each of fileN. One column for
2504       each of fileN is prepended to the output line to note how X’s line is
2505       different from it.
2506
2507       A - character in the column N means that the line appears in fileN but
2508       it does not appear in the result. A + character in the column N means
2509       that the line appears in the result, and fileN does not have that line
2510       (in other words, the line was added, from the point of view of that
2511       parent).
2512
2513       In the above example output, the function signature was changed from
2514       both files (hence two - removals from both file1 and file2, plus ++ to
2515       mean one line that was added does not appear in either file1 or file2).
2516       Also eight other lines are the same from file1 but do not appear in
2517       file2 (hence prefixed with +).
2518
2519       When shown by git diff-tree -c, it compares the parents of a merge
2520       commit with the merge result (i.e. file1..fileN are the parents). When
2521       shown by git diff-files -c, it compares the two unresolved merge
2522       parents with the working tree file (i.e. file1 is stage 2 aka "our
2523       version", file2 is stage 3 aka "their version").
2524

EXAMPLES

2526       git log --no-merges
2527           Show the whole commit history, but skip any merges
2528
2529       git log v2.6.12.. include/scsi drivers/scsi
2530           Show all commits since version v2.6.12 that changed any file in the
2531           include/scsi or drivers/scsi subdirectories
2532
2533       git log --since="2 weeks ago" -- gitk
2534           Show the changes during the last two weeks to the file gitk. The --
2535           is necessary to avoid confusion with the branch named gitk
2536
2537       git log --name-status release..test
2538           Show the commits that are in the "test" branch but not yet in the
2539           "release" branch, along with the list of paths each commit
2540           modifies.
2541
2542       git log --follow builtin/rev-list.c
2543           Shows the commits that changed builtin/rev-list.c, including those
2544           commits that occurred before the file was given its present name.
2545
2546       git log --branches --not --remotes=origin
2547           Shows all commits that are in any of local branches but not in any
2548           of remote-tracking branches for origin (what you have that origin
2549           doesn’t).
2550
2551       git log master --not --remotes=*/master
2552           Shows all commits that are in local master but not in any remote
2553           repository master branches.
2554
2555       git log -p -m --first-parent
2556           Shows the history including change diffs, but only from the “main
2557           branch” perspective, skipping commits that come from merged
2558           branches, and showing full diffs of changes introduced by the
2559           merges. This makes sense only when following a strict policy of
2560           merging all topic branches when staying on a single integration
2561           branch.
2562
2563       git log -L '/int main/',/^}/:main.c
2564           Shows how the function main() in the file main.c evolved over time.
2565
2566       git log -3
2567           Limits the number of commits to show to 3.
2568

DISCUSSION

2570       Git is to some extent character encoding agnostic.
2571
2572       •   The contents of the blob objects are uninterpreted sequences of
2573           bytes. There is no encoding translation at the core level.
2574
2575       •   Path names are encoded in UTF-8 normalization form C. This applies
2576           to tree objects, the index file, ref names, as well as path names
2577           in command line arguments, environment variables and config files
2578           (.git/config (see git-config(1)), gitignore(5), gitattributes(5)
2579           and gitmodules(5)).
2580
2581           Note that Git at the core level treats path names simply as
2582           sequences of non-NUL bytes, there are no path name encoding
2583           conversions (except on Mac and Windows). Therefore, using non-ASCII
2584           path names will mostly work even on platforms and file systems that
2585           use legacy extended ASCII encodings. However, repositories created
2586           on such systems will not work properly on UTF-8-based systems (e.g.
2587           Linux, Mac, Windows) and vice versa. Additionally, many Git-based
2588           tools simply assume path names to be UTF-8 and will fail to display
2589           other encodings correctly.
2590
2591       •   Commit log messages are typically encoded in UTF-8, but other
2592           extended ASCII encodings are also supported. This includes
2593           ISO-8859-x, CP125x and many others, but not UTF-16/32, EBCDIC and
2594           CJK multi-byte encodings (GBK, Shift-JIS, Big5, EUC-x, CP9xx etc.).
2595
2596       Although we encourage that the commit log messages are encoded in
2597       UTF-8, both the core and Git Porcelain are designed not to force UTF-8
2598       on projects. If all participants of a particular project find it more
2599       convenient to use legacy encodings, Git does not forbid it. However,
2600       there are a few things to keep in mind.
2601
2602        1. git commit and git commit-tree issues a warning if the commit log
2603           message given to it does not look like a valid UTF-8 string, unless
2604           you explicitly say your project uses a legacy encoding. The way to
2605           say this is to have i18n.commitEncoding in .git/config file, like
2606           this:
2607
2608               [i18n]
2609                       commitEncoding = ISO-8859-1
2610
2611           Commit objects created with the above setting record the value of
2612           i18n.commitEncoding in its encoding header. This is to help other
2613           people who look at them later. Lack of this header implies that the
2614           commit log message is encoded in UTF-8.
2615
2616        2. git log, git show, git blame and friends look at the encoding
2617           header of a commit object, and try to re-code the log message into
2618           UTF-8 unless otherwise specified. You can specify the desired
2619           output encoding with i18n.logOutputEncoding in .git/config file,
2620           like this:
2621
2622               [i18n]
2623                       logOutputEncoding = ISO-8859-1
2624
2625           If you do not have this configuration variable, the value of
2626           i18n.commitEncoding is used instead.
2627
2628       Note that we deliberately chose not to re-code the commit log message
2629       when a commit is made to force UTF-8 at the commit object level,
2630       because re-coding to UTF-8 is not necessarily a reversible operation.
2631

CONFIGURATION

2633       See git-config(1) for core variables and git-diff(1) for settings
2634       related to diff generation.
2635
2636       format.pretty
2637           Default for the --format option. (See Pretty Formats above.)
2638           Defaults to medium.
2639
2640       i18n.logOutputEncoding
2641           Encoding to use when displaying logs. (See Discussion above.)
2642           Defaults to the value of i18n.commitEncoding if set, and UTF-8
2643           otherwise.
2644
2645       Everything above this line in this section isn’t included from the git-
2646       config(1) documentation. The content that follows is the same as what’s
2647       found there:
2648
2649       log.abbrevCommit
2650           If true, makes git-log(1), git-show(1), and git-whatchanged(1)
2651           assume --abbrev-commit. You may override this option with
2652           --no-abbrev-commit.
2653
2654       log.date
2655           Set the default date-time mode for the log command. Setting a value
2656           for log.date is similar to using git log's --date option. See git-
2657           log(1) for details.
2658
2659           If the format is set to "auto:foo" and the pager is in use, format
2660           "foo" will be the used for the date format. Otherwise "default"
2661           will be used.
2662
2663       log.decorate
2664           Print out the ref names of any commits that are shown by the log
2665           command. If short is specified, the ref name prefixes refs/heads/,
2666           refs/tags/ and refs/remotes/ will not be printed. If full is
2667           specified, the full ref name (including prefix) will be printed. If
2668           auto is specified, then if the output is going to a terminal, the
2669           ref names are shown as if short were given, otherwise no ref names
2670           are shown. This is the same as the --decorate option of the git
2671           log.
2672
2673       log.initialDecorationSet
2674           By default, git log only shows decorations for certain known ref
2675           namespaces. If all is specified, then show all refs as decorations.
2676
2677       log.excludeDecoration
2678           Exclude the specified patterns from the log decorations. This is
2679           similar to the --decorate-refs-exclude command-line option, but the
2680           config option can be overridden by the --decorate-refs option.
2681
2682       log.diffMerges
2683           Set diff format to be used when --diff-merges=on is specified, see
2684           --diff-merges in git-log(1) for details. Defaults to separate.
2685
2686       log.follow
2687           If true, git log will act as if the --follow option was used when a
2688           single <path> is given. This has the same limitations as --follow,
2689           i.e. it cannot be used to follow multiple files and does not work
2690           well on non-linear history.
2691
2692       log.graphColors
2693           A list of colors, separated by commas, that can be used to draw
2694           history lines in git log --graph.
2695
2696       log.showRoot
2697           If true, the initial commit will be shown as a big creation event.
2698           This is equivalent to a diff against an empty tree. Tools like git-
2699           log(1) or git-whatchanged(1), which normally hide the root commit
2700           will now show it. True by default.
2701
2702       log.showSignature
2703           If true, makes git-log(1), git-show(1), and git-whatchanged(1)
2704           assume --show-signature.
2705
2706       log.mailmap
2707           If true, makes git-log(1), git-show(1), and git-whatchanged(1)
2708           assume --use-mailmap, otherwise assume --no-use-mailmap. True by
2709           default.
2710
2711       notes.mergeStrategy
2712           Which merge strategy to choose by default when resolving notes
2713           conflicts. Must be one of manual, ours, theirs, union, or
2714           cat_sort_uniq. Defaults to manual. See "NOTES MERGE STRATEGIES"
2715           section of git-notes(1) for more information on each strategy.
2716
2717           This setting can be overridden by passing the --strategy option to
2718           git-notes(1).
2719
2720       notes.<name>.mergeStrategy
2721           Which merge strategy to choose when doing a notes merge into
2722           refs/notes/<name>. This overrides the more general
2723           "notes.mergeStrategy". See the "NOTES MERGE STRATEGIES" section in
2724           git-notes(1) for more information on the available strategies.
2725
2726       notes.displayRef
2727           Which ref (or refs, if a glob or specified more than once), in
2728           addition to the default set by core.notesRef or GIT_NOTES_REF, to
2729           read notes from when showing commit messages with the git log
2730           family of commands.
2731
2732           This setting can be overridden with the GIT_NOTES_DISPLAY_REF
2733           environment variable, which must be a colon separated list of refs
2734           or globs.
2735
2736           A warning will be issued for refs that do not exist, but a glob
2737           that does not match any refs is silently ignored.
2738
2739           This setting can be disabled by the --no-notes option to the git
2740           log family of commands, or by the --notes=<ref> option accepted by
2741           those commands.
2742
2743           The effective value of "core.notesRef" (possibly overridden by
2744           GIT_NOTES_REF) is also implicitly added to the list of refs to be
2745           displayed.
2746
2747       notes.rewrite.<command>
2748           When rewriting commits with <command> (currently amend or rebase),
2749           if this variable is false, git will not copy notes from the
2750           original to the rewritten commit. Defaults to true. See also
2751           "notes.rewriteRef" below.
2752
2753           This setting can be overridden with the GIT_NOTES_REWRITE_REF
2754           environment variable, which must be a colon separated list of refs
2755           or globs.
2756
2757       notes.rewriteMode
2758           When copying notes during a rewrite (see the
2759           "notes.rewrite.<command>" option), determines what to do if the
2760           target commit already has a note. Must be one of overwrite,
2761           concatenate, cat_sort_uniq, or ignore. Defaults to concatenate.
2762
2763           This setting can be overridden with the GIT_NOTES_REWRITE_MODE
2764           environment variable.
2765
2766       notes.rewriteRef
2767           When copying notes during a rewrite, specifies the (fully
2768           qualified) ref whose notes should be copied. May be a glob, in
2769           which case notes in all matching refs will be copied. You may also
2770           specify this configuration several times.
2771
2772           Does not have a default value; you must configure this variable to
2773           enable note rewriting. Set it to refs/notes/commits to enable
2774           rewriting for the default commit notes.
2775
2776           Can be overridden with the GIT_NOTES_REWRITE_REF environment
2777           variable. See notes.rewrite.<command> above for a further
2778           description of its format.
2779

GIT

2781       Part of the git(1) suite
2782
2783
2784
2785Git 2.39.1                        2023-01-13                        GIT-LOG(1)
Impressum