3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.40.0.rc2
10 .TH "GIT\-LOG" "1" "03/06/2023" "Git 2\&.40\&.0\&.rc2" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-log \- Show commit logs
35 \fIgit log\fR [<options>] [<revision\-range>] [[\-\-] <path>\&...]
40 Shows the commit logs\&.
42 List commits that are reachable by following the \fBparent\fR links from the given commit(s), but exclude commits that are reachable from the one(s) given with a \fI^\fR in front of them\&. The output is given in reverse chronological order by default\&.
44 You can think of this as a set operation\&. Commits reachable from any of the commits given on the command line form a set, and then commits reachable from any of the ones given with \fI^\fR in front are subtracted from that set\&. The remaining commits are what comes out in the command\(cqs output\&. Various other options and paths parameters can be used to further limit the result\&.
46 Thus, the following command:
52 $ git log foo bar ^baz
59 means "list all the commits which are reachable from \fIfoo\fR or \fIbar\fR, but not from \fIbaz\fR"\&.
61 A special notation "\fI<commit1>\fR\&.\&.\fI<commit2>\fR" can be used as a short\-hand for "^\fI<commit1>\fR \fI<commit2>\fR"\&. For example, either of the following may be used interchangeably:
67 $ git log origin\&.\&.HEAD
68 $ git log HEAD ^origin
75 Another special notation is "\fI<commit1>\fR\&...\fI<commit2>\fR" which is useful for merges\&. The resulting set of commits is the symmetric difference between the two operands\&. The following two commands are equivalent:
81 $ git log A B \-\-not $(git merge\-base \-\-all A B)
89 The command takes options applicable to the \fBgit-rev-list\fR(1) command to control what is shown and how, and options applicable to the \fBgit-diff\fR(1) command to control how the changes each commit introduces are shown\&.
94 Continue listing the history of a file beyond renames (works only for a single file)\&.
97 \-\-no\-decorate, \-\-decorate[=short|full|auto|no]
99 Print out the ref names of any commits that are shown\&. If
101 is specified, the ref name prefixes
106 will not be printed\&. If
108 is specified, the full ref name (including prefix) will be printed\&. If
110 is specified, then if the output is going to a terminal, the ref names are shown as if
112 were given, otherwise no ref names are shown\&. The option
115 \fB\-\-decorate=short\fR\&. Default to configuration value of
117 if configured, otherwise,
121 \-\-decorate\-refs=<pattern>, \-\-decorate\-refs\-exclude=<pattern>
123 For each candidate reference, do not use it for decoration if it matches any patterns given to
124 \fB\-\-decorate\-refs\-exclude\fR
125 or if it doesn\(cqt match any of the patterns given to
126 \fB\-\-decorate\-refs\fR\&. The
127 \fBlog\&.excludeDecoration\fR
128 config option allows excluding refs from the decorations, but an explicit
129 \fB\-\-decorate\-refs\fR
130 pattern will override a match in
131 \fBlog\&.excludeDecoration\fR\&.
133 If none of these options or config settings are given, then references are used as decoration if they match
137 \fBrefs/stash/\fR, or
141 \-\-clear\-decorations
143 When specified, this option clears all previous
144 \fB\-\-decorate\-refs\fR
146 \fB\-\-decorate\-refs\-exclude\fR
147 options and relaxes the default decoration filter to include all references\&. This option is assumed if the config value
148 \fBlog\&.initialDecorationSet\fR
155 Print out the ref name given on the command line by which each commit was reached\&.
158 \-\-[no\-]mailmap, \-\-[no\-]use\-mailmap
160 Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses\&. See
161 \fBgit-shortlog\fR(1)\&.
167 \fBgit log \-p <path>\&.\&.\&.\fR
168 shows commits that touch the specified paths, and diffs about the same specified paths\&. With this, the full diff is shown for commits that touch the specified paths; this means that "<path>\&..." limits only commits, and doesn\(cqt limit diff for those commits\&.
170 Note that this affects all diff\-based output types, e\&.g\&. those produced by
171 \fB\-\-stat\fR, etc\&.
176 Include a line \(lqlog size <number>\(rq in the output for each commit, where <number> is the length of that commit\(cqs message in bytes\&. Intended to speed up tools that read log messages from
178 output by allowing them to allocate space in advance\&.
181 \-L<start>,<end>:<file>, \-L:<funcname>:<file>
183 Trace the evolution of the line range given by
184 \fI<start>,<end>\fR, or by the function name regex
185 \fI<funcname>\fR, within the
186 \fI<file>\fR\&. You may not give any pathspec limiters\&. This is currently limited to a walk starting from a single revision, i\&.e\&., you may only give zero or one positive revision arguments, and
191 \fI<funcname>\fR) must exist in the starting revision\&. You can specify this option more than once\&. Implies
192 \fB\-\-patch\fR\&. Patch output can be suppressed using
193 \fB\-\-no\-patch\fR, but other diff formats (namely
199 \fB\-\-name\-only\fR,
200 \fB\-\-name\-status\fR,
201 \fB\-\-check\fR) are not currently implemented\&.
206 can take one of these forms:
222 is a number, it specifies an absolute line number (lines count from 1)\&.
235 This form will use the first line matching the given POSIX regex\&. If
237 is a regex, it will search from the end of the previous
239 range, if any, otherwise from the start of file\&. If
242 \fB^/regex/\fR, it will search from the start of file\&. If
244 is a regex, it will search starting at the line given by
258 This is only valid for
260 and will specify a number of lines before or after the line given by
269 \fI<end>\fR, it is a regular expression that denotes the range from the first funcname line that matches
270 \fI<funcname>\fR, up to the next funcname line\&.
272 searches from the end of the previous
274 range, if any, otherwise from the start of file\&.
276 searches from the start of file\&. The function names are determined in the same way as
278 works out patch hunk headers (see
279 \fIDefining a custom hunk\-header\fR
281 \fBgitattributes\fR(5))\&.
286 Show only commits in the specified revision range\&. When no <revision\-range> is specified, it defaults to
288 (i\&.e\&. the whole history leading to the current commit)\&.
289 \fBorigin\&.\&.HEAD\fR
290 specifies all the commits reachable from the current commit (i\&.e\&.
291 \fBHEAD\fR), but not from
292 \fBorigin\fR\&. For a complete list of ways to spell <revision\-range>, see the
293 \fISpecifying Ranges\fR
295 \fBgitrevisions\fR(7)\&.
300 Show only commits that are enough to explain how the files that match the specified paths came to be\&. See
301 \fIHistory Simplification\fR
302 below for details and other simplification modes\&.
304 Paths may need to be prefixed with
306 to separate them from options or the revision range, when confusion arises\&.
308 .SS "Commit Limiting"
310 Besides specifying a range of commits that should be listed using the special notations explained in the description, additional commit limiting may be applied\&.
312 Using more options generally further limits the output (e\&.g\&. \fB\-\-since=<date1>\fR limits to commits newer than \fB<date1>\fR, and using it with \fB\-\-grep=<pattern>\fR further limits to commits whose log message has a line that matches \fB<pattern>\fR), unless otherwise noted\&.
314 Note that these are applied before commit ordering and formatting options, such as \fB\-\-reverse\fR\&.
316 \-<number>, \-n <number>, \-\-max\-count=<number>
318 Limit the number of commits to output\&.
325 commits before starting to show the commit output\&.
328 \-\-since=<date>, \-\-after=<date>
330 Show commits more recent than a specific date\&.
333 \-\-since\-as\-filter=<date>
335 Show all commits more recent than a specific date\&. This visits all commits in the range, rather than stopping at the first commit which is older than a specific date\&.
338 \-\-until=<date>, \-\-before=<date>
340 Show commits older than a specific date\&.
343 \-\-author=<pattern>, \-\-committer=<pattern>
345 Limit the commits output to ones with author/committer header lines that match the specified pattern (regular expression)\&. With more than one
346 \fB\-\-author=<pattern>\fR, commits whose author matches any of the given patterns are chosen (similarly for multiple
347 \fB\-\-committer=<pattern>\fR)\&.
350 \-\-grep\-reflog=<pattern>
352 Limit the commits output to ones with reflog entries that match the specified pattern (regular expression)\&. With more than one
353 \fB\-\-grep\-reflog\fR, commits whose reflog message matches any of the given patterns are chosen\&. It is an error to use this option unless
354 \fB\-\-walk\-reflogs\fR
360 Limit the commits output to ones with log message that matches the specified pattern (regular expression)\&. With more than one
361 \fB\-\-grep=<pattern>\fR, commits whose message matches any of the given patterns are chosen (but see
362 \fB\-\-all\-match\fR)\&.
366 is in effect, the message from the notes is matched as if it were part of the log message\&.
371 Limit the commits output to ones that match all given
372 \fB\-\-grep\fR, instead of ones that match at least one\&.
377 Limit the commits output to ones with log message that do not match the pattern specified with
378 \fB\-\-grep=<pattern>\fR\&.
381 \-i, \-\-regexp\-ignore\-case
383 Match the regular expression limiting patterns without regard to letter case\&.
388 Consider the limiting patterns to be basic regular expressions; this is the default\&.
391 \-E, \-\-extended\-regexp
393 Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions\&.
396 \-F, \-\-fixed\-strings
398 Consider the limiting patterns to be fixed strings (don\(cqt interpret pattern as a regular expression)\&.
401 \-P, \-\-perl\-regexp
403 Consider the limiting patterns to be Perl\-compatible regular expressions\&.
405 Support for these types of regular expressions is an optional compile\-time dependency\&. If Git wasn\(cqt compiled with support for them providing this option will cause it to die\&.
410 Stop when a given path disappears from the tree\&.
415 Print only merge commits\&. This is exactly the same as
416 \fB\-\-min\-parents=2\fR\&.
421 Do not print commits with more than one parent\&. This is exactly the same as
422 \fB\-\-max\-parents=1\fR\&.
425 \-\-min\-parents=<number>, \-\-max\-parents=<number>, \-\-no\-min\-parents, \-\-no\-max\-parents
427 Show only commits which have at least (or at most) that many parent commits\&. In particular,
428 \fB\-\-max\-parents=1\fR
430 \fB\-\-no\-merges\fR,
431 \fB\-\-min\-parents=2\fR
434 \fB\-\-max\-parents=0\fR
435 gives all root commits and
436 \fB\-\-min\-parents=3\fR
437 all octopus merges\&.
439 \fB\-\-no\-min\-parents\fR
441 \fB\-\-no\-max\-parents\fR
442 reset these limits (to no limit) again\&. Equivalent forms are
443 \fB\-\-min\-parents=0\fR
444 (any commit has 0 or more parents) and
445 \fB\-\-max\-parents=\-1\fR
446 (negative numbers denote no upper limit)\&.
451 When finding commits to include, follow only the first parent commit upon seeing a merge commit\&. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge\&.
453 This option also changes default diff format for merge commits to
454 \fBfirst\-parent\fR, see
455 \fB\-\-diff\-merges=first\-parent\fR
459 \-\-exclude\-first\-parent\-only
461 When finding commits to exclude (with a
462 \fI^\fR), follow only the first parent commit upon seeing a merge commit\&. This can be used to find the set of changes in a topic branch from the point where it diverged from the remote branch, given that arbitrary merges can be valid topic branch changes\&.
467 Reverses the meaning of the
469 prefix (or lack thereof) for all following revision specifiers, up to the next
475 Pretend as if all the refs in
476 \fBrefs/\fR, along with
477 \fBHEAD\fR, are listed on the command line as
481 \-\-branches[=<pattern>]
483 Pretend as if all the refs in
485 are listed on the command line as
488 is given, limit branches to ones matching given shell glob\&. If pattern lacks
493 at the end is implied\&.
498 Pretend as if all the refs in
500 are listed on the command line as
503 is given, limit tags to ones matching given shell glob\&. If pattern lacks
508 at the end is implied\&.
511 \-\-remotes[=<pattern>]
513 Pretend as if all the refs in
515 are listed on the command line as
518 is given, limit remote\-tracking branches to ones matching given shell glob\&. If pattern lacks
523 at the end is implied\&.
526 \-\-glob=<glob\-pattern>
528 Pretend as if all the refs matching shell glob
529 \fI<glob\-pattern>\fR
530 are listed on the command line as
531 \fI<commit>\fR\&. Leading
532 \fIrefs/\fR, is automatically prepended if missing\&. If pattern lacks
537 at the end is implied\&.
540 \-\-exclude=<glob\-pattern>
542 Do not include refs matching
543 \fI<glob\-pattern>\fR
548 \fB\-\-remotes\fR, or
550 would otherwise consider\&. Repetitions of this option accumulate exclusion patterns up to the next
554 \fB\-\-remotes\fR, or
556 option (other options or arguments do not clear accumulated patterns)\&.
558 The patterns given should not begin with
565 \fB\-\-remotes\fR, respectively, and they must begin with
570 \fB\-\-all\fR\&. If a trailing
572 is intended, it must be given explicitly\&.
575 \-\-exclude\-hidden=[receive|uploadpack]
577 Do not include refs that would be hidden by
578 \fBgit\-receive\-pack\fR
580 \fBgit\-upload\-pack\fR
581 by consulting the appropriate
582 \fBreceive\&.hideRefs\fR
584 \fBuploadpack\&.hideRefs\fR
585 configuration along with
586 \fBtransfer\&.hideRefs\fR
588 \fBgit-config\fR(1))\&. This option affects the next pseudo\-ref option
592 and is cleared after processing them\&.
597 Pretend as if all objects mentioned by reflogs are listed on the command line as
603 Pretend as if all objects mentioned as ref tips of alternate repositories were listed on the command line\&. An alternate repository is any repository whose object directory is specified in
604 \fBobjects/info/alternates\fR\&. The set of included objects may be modified by
605 \fBcore\&.alternateRefsCommand\fR, etc\&. See
606 \fBgit-config\fR(1)\&.
611 By default, all working trees will be examined by the following options when there are more than one (see
612 \fBgit-worktree\fR(1)):
616 \fB\-\-indexed\-objects\fR\&. This option forces them to examine the current working tree only\&.
621 Upon seeing an invalid object name in the input, pretend as if the bad input was not given\&.
626 Pretend as if the bad bisection ref
627 \fBrefs/bisect/bad\fR
628 was listed and as if it was followed by
630 and the good bisection refs
631 \fBrefs/bisect/good\-*\fR
632 on the command line\&.
639 listed on the command line, read them from the standard input\&. If a
641 separator is seen, stop reading commits and start reading paths to limit the result\&.
647 \fB\-\-cherry\-pick\fR
648 (see below) but mark equivalent commits with
650 rather than omitting them, and inequivalent ones with
656 Omit any commit that introduces the same change as another commit on the \(lqother side\(rq when the set of commits are limited with symmetric difference\&.
658 For example, if you have two branches,
661 \fBB\fR, a usual way to list all commits on only one side of them is with
662 \fB\-\-left\-right\fR
663 (see the example below in the description of the
664 \fB\-\-left\-right\fR
665 option)\&. However, it shows the commits that were cherry\-picked from the other branch (for example, \(lq3rd on b\(rq may be cherry\-picked from branch A)\&. With this option, such pairs of commits are excluded from the output\&.
668 \-\-left\-only, \-\-right\-only
670 List only commits on the respective side of a symmetric difference, i\&.e\&. only those which would be marked
675 \fB\-\-left\-right\fR\&.
678 \fB\-\-cherry\-pick \-\-right\-only A\&.\&.\&.B\fR
679 omits those commits from
683 or are patch\-equivalent to a commit in
684 \fBA\fR\&. In other words, this lists the
687 \fBgit cherry A B\fR\&. More precisely,
688 \fB\-\-cherry\-pick \-\-right\-only \-\-no\-merges\fR
689 gives the exact list\&.
695 \fB\-\-right\-only \-\-cherry\-mark \-\-no\-merges\fR; useful to limit the output to the commits on our side and mark those that have been applied to the other side of a forked history with
696 \fBgit log \-\-cherry upstream\&.\&.\&.mybranch\fR, similar to
697 \fBgit cherry upstream mybranch\fR\&.
700 \-g, \-\-walk\-reflogs
702 Instead of walking the commit ancestry chain, walk reflog entries from the most recent one to older ones\&. When this option is used you cannot specify commits to exclude (that is,
704 \fIcommit1\&.\&.commit2\fR, and
705 \fIcommit1\&.\&.\&.commit2\fR
706 notations cannot be used)\&.
714 (for obvious reasons), this causes the output to have two extra lines of information taken from the reflog\&. The reflog designator in the output may be shown as
718 is the reverse\-chronological index in the reflog) or as
719 \fBref@{timestamp}\fR
720 (with the timestamp for that entry), depending on a few rules:
730 If the starting point is specified as
731 \fBref@{Nth}\fR, show the index format\&.
742 If the starting point was specified as
743 \fBref@{now}\fR, show the timestamp format\&.
754 If neither was used, but
756 was given on the command line, show the timestamp in the format requested by
768 Otherwise, show the index format\&.
772 \fB\-\-pretty=oneline\fR, the commit message is prefixed with this information on the same line\&. This option cannot be combined with
773 \fB\-\-reverse\fR\&. See also
774 \fBgit-reflog\fR(1)\&.
777 \fB\-\-pretty=reference\fR, this information will not be shown at all\&.
782 After a failed merge, show refs that touch files having a conflict and don\(cqt exist on all heads to merge\&.
787 Output excluded boundary commits\&. Boundary commits are prefixed with
790 .SS "History Simplification"
792 Sometimes you are only interested in parts of the history, for example the commits modifying a particular <path>\&. But there are two parts of \fIHistory Simplification\fR, one part is selecting the commits and the other is how to do it, as there are various strategies to simplify the history\&.
794 The following options select the commits to be shown:
798 Commits modifying the given <paths> are selected\&.
801 \-\-simplify\-by\-decoration
803 Commits that are referred by some branch or tag are selected\&.
806 Note that extra commits can be shown to give a meaningful history\&.
808 The following options affect the way the simplification is performed:
812 Simplifies the history to the simplest history explaining the final state of the tree\&. Simplest because it prunes some side branches if the end result is the same (i\&.e\&. merging branches with the same content)
817 Include all commits from the default mode, but also any merge commits that are not TREESAME to the first parent but are TREESAME to a later parent\&. This mode is helpful for showing the merge commits that "first introduced" a change to a branch\&.
822 Same as the default mode, but does not prune some history\&.
827 Only the selected commits are shown, plus some to have a meaningful history\&.
832 All commits in the simplified history are shown\&.
838 \fB\-\-full\-history\fR
839 to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge\&.
842 \-\-ancestry\-path[=<commit>]
844 When given a range of commits to display (e\&.g\&.
845 \fIcommit1\&.\&.commit2\fR
847 \fIcommit2 ^commit1\fR), only display commits in that range that are ancestors of <commit>, descendants of <commit>, or <commit> itself\&. If no commit is specified, use
849 (the excluded part of the range) as <commit>\&. Can be passed multiple times; if so, a commit is included if it is any of the commits given or if it is an ancestor or descendant of one of them\&.
852 A more detailed explanation follows\&.
854 Suppose you specified \fBfoo\fR as the <paths>\&. We shall call commits that modify \fBfoo\fR !TREESAME, and the rest TREESAME\&. (In a diff filtered for \fBfoo\fR, they look different and equal, respectively\&.)
856 In the following, we will always refer to the same example history to illustrate the differences between simplification settings\&. We assume that you are filtering for a file \fBfoo\fR in this commit graph:
862 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
866 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq X
873 The horizontal line of history A\-\-\-Q is taken to be the first parent of each merge\&. The commits are:
884 is the initial commit, in which
886 exists with contents \(lqasdf\(rq, and a file
888 exists with contents \(lqquux\(rq\&. Initial commits are compared to an empty tree, so
904 contains just \(lqfoo\(rq\&.
916 contains the same change as
919 is trivial and hence TREESAME to all parents\&.
932 \fBfoo\fR, but its merge
934 changes it to \(lqfoobar\(rq, so it is not TREESAME to any parent\&.
948 to \(lqbaz\(rq\&. Its merge
950 combines the strings from
954 to \(lqfoobarbaz\(rq; i\&.e\&., it is not TREESAME to any parent\&.
968 to \(lqxyzzy\(rq, and its merge
970 combines the strings to \(lqquux xyzzy\(rq\&.
986 is an independent root commit that added a new file
1004 \fBrev\-list\fR walks backwards through history, including or excluding commits based on whether \fB\-\-full\-history\fR and/or parent rewriting (via \fB\-\-parents\fR or \fB\-\-children\fR) are used\&. The following settings are available\&.
1008 Commits are included if they are not TREESAME to any parent (though this can be changed, see
1010 below)\&. If the commit was a merge, and it was TREESAME to one parent, follow only that parent\&. (Even if there are several TREESAME parents, follow only one of them\&.) Otherwise, follow all parents\&.
1018 \&.\-A\-\-\-N\-\-\-O
1020 I\-\-\-\-\-\-\-\-\-D
1026 Note how the rule to only follow the TREESAME parent, if one is available, removed
1028 from consideration entirely\&.
1031 \fBN\fR, but is TREESAME\&. Root commits are compared to an empty tree, so
1035 Parent/child relations are only visible with
1036 \fB\-\-parents\fR, but that does not affect the commits selected in default mode, so we have shown the parent lines\&.
1039 \-\-full\-history without parent rewriting
1041 This mode differs from the default in one point: always follow all parents of a merge, even if it is TREESAME to one of them\&. Even if more than one side of the merge has commits that are included, this does not imply that the merge itself is! In the example, we get
1054 was excluded because it is TREESAME to both parents\&.
1059 were all walked, but only
1061 was !TREESAME, so the others do not appear\&.
1063 Note that without parent rewriting, it is not really possible to talk about the parent/child relationships between the commits, so we show them disconnected\&.
1066 \-\-full\-history with parent rewriting
1068 Ordinary commits are only included if they are !TREESAME (though this can be changed, see
1072 Merges are always included\&. However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves\&. This results in
1078 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
1082 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq
1089 \fB\-\-full\-history\fR
1090 without rewriting above\&. Note that
1092 was pruned away because it is TREESAME, but the parent list of P was rewritten to contain
1094 \fBI\fR\&. The same happened for
1104 In addition to the above settings, you can change whether TREESAME affects inclusion:
1108 Commits that are walked are included if they are not TREESAME to any parent\&.
1113 All commits that are walked are included\&.
1116 \fB\-\-full\-history\fR, this still simplifies merges: if one of the parents is TREESAME, we follow only that one, so the other sides of the merge are never walked\&.
1119 \-\-simplify\-merges
1121 First, build a history graph in the same way that
1122 \fB\-\-full\-history\fR
1123 with parent rewriting does (see above)\&.
1125 Then simplify each commit
1129 in the final history according to the following rules:
1133 \h'-04'\(bu\h'+03'\c
1147 \h'-04'\(bu\h'+03'\c
1157 with its simplification
1158 \fBP\(aq\fR\&. In the process, drop parents that are ancestors of other parents or that are root commits TREESAME to an empty tree, and remove duplicates, but take care to never drop all parents that we are TREESAME to\&.
1163 \h'-04'\(bu\h'+03'\c
1169 If after this parent rewriting,
1171 is a root or merge commit (has zero or >1 parents), a boundary commit, or !TREESAME, it remains\&. Otherwise, it is replaced with its only parent\&.
1174 The effect of this is best shown by way of comparing to
1175 \fB\-\-full\-history\fR
1176 with parent rewriting\&. The example turns into:
1182 \&.\-A\-\-\-M\-\-\-N\-\-\-O
1186 `\-\-\-\-\-\-\-\-\-\(aq
1192 Note the major differences in
1197 \fB\-\-full\-history\fR:
1201 \h'-04'\(bu\h'+03'\c
1207 \fBN\fR\(aqs parent list had
1209 removed, because it is an ancestor of the other parent
1212 remained because it is !TREESAME\&.
1217 \h'-04'\(bu\h'+03'\c
1223 \fBP\fR\(aqs parent list similarly had
1227 was then removed completely, because it had one parent and is TREESAME\&.
1232 \h'-04'\(bu\h'+03'\c
1238 \fBQ\fR\(aqs parent list had
1243 was then removed, because it was a TREESAME root\&.
1245 was then removed completely, because it had one parent and is TREESAME\&.
1249 There is another simplification mode available:
1251 \-\-ancestry\-path[=<commit>]
1253 Limit the displayed commits to those which are an ancestor of <commit>, or which are a descendant of <commit>, or are <commit> itself\&.
1255 As an example use case, consider the following commit history:
1261 D\-\-\-E\-\-\-\-\-\-\-F
1263 B\-\-\-C\-\-\-G\-\-\-H\-\-\-I\-\-\-J
1265 A\-\-\-\-\-\-\-K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1273 computes the set of commits that are ancestors of
1274 \fBM\fR, but excludes the ones that are ancestors of
1275 \fBD\fR\&. This is useful to see what happened to the history leading to
1278 \fBD\fR, in the sense that \(lqwhat does
1280 have that did not exist in
1281 \fBD\fR\(rq\&. The result in this example would be all the commits, except
1287 itself, of course)\&.
1289 When we want to find out what commits in
1291 are contaminated with the bug introduced by
1293 and need fixing, however, we might want to view only the subset of
1295 that are actually descendants of
1296 \fBD\fR, i\&.e\&. excluding
1299 \fBK\fR\&. This is exactly what the
1300 \fB\-\-ancestry\-path\fR
1301 option does\&. Applied to the
1303 range, it results in:
1311 G\-\-\-H\-\-\-I\-\-\-J
1320 \fB\-\-ancestry\-path=D\fR
1322 \fB\-\-ancestry\-path\fR
1323 which means the same thing when applied to the
1325 range but is just more explicit\&.
1327 If we instead are interested in a given topic within this range, and all commits affected by that topic, we may only want to view the subset of
1329 which contain that topic in their ancestry path\&. So, using
1330 \fB\-\-ancestry\-path=H D\&.\&.M\fR
1331 for example would result in:
1339 G\-\-\-H\-\-\-I\-\-\-J
1348 \fB\-\-ancestry\-path=K D\&.\&.M\fR
1355 K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1363 Before discussing another option, \fB\-\-show\-pulls\fR, we need to create a new example history\&.
1365 A common problem users face when looking at simplified history is that a commit they know changed a file somehow does not appear in the file\(cqs simplified history\&. Let\(cqs demonstrate a new example and show how options such as \fB\-\-full\-history\fR and \fB\-\-simplify\-merges\fR works in that case:
1371 \&.\-A\-\-\-M\-\-\-\-\-C\-\-N\-\-\-O\-\-\-P
1373 I B \e R\-\(aq`\-Z\(aq /
1376 `\-\-\-X\-\-\(aq `\-\-\-Y\-\-\(aq
1383 For this example, suppose \fBI\fR created \fBfile\&.txt\fR which was modified by \fBA\fR, \fBB\fR, and \fBX\fR in different ways\&. The single\-parent commits \fBC\fR, \fBZ\fR, and \fBY\fR do not change \fBfile\&.txt\fR\&. The merge commit \fBM\fR was created by resolving the merge conflict to include both changes from \fBA\fR and \fBB\fR and hence is not TREESAME to either\&. The merge commit \fBR\fR, however, was created by ignoring the contents of \fBfile\&.txt\fR at \fBM\fR and taking only the contents of \fBfile\&.txt\fR at \fBX\fR\&. Hence, \fBR\fR is TREESAME to \fBX\fR but not \fBM\fR\&. Finally, the natural merge resolution to create \fBN\fR is to take the contents of \fBfile\&.txt\fR at \fBR\fR, so \fBN\fR is TREESAME to \fBR\fR but not \fBC\fR\&. The merge commits \fBO\fR and \fBP\fR are TREESAME to their first parents, but not to their second parents, \fBZ\fR and \fBY\fR respectively\&.
1385 When using the default mode, \fBN\fR and \fBR\fR both have a TREESAME parent, so those edges are walked and the others are ignored\&. The resulting history graph is:
1398 When using \fB\-\-full\-history\fR, Git walks every edge\&. This will discover the commits \fBA\fR and \fBB\fR and the merge \fBM\fR, but also will reveal the merge commits \fBO\fR and \fBP\fR\&. With parent rewriting, the resulting graph is:
1404 \&.\-A\-\-\-M\-\-\-\-\-\-\-\-N\-\-\-O\-\-\-P
1406 I B \e R\-\(aq`\-\-\(aq /
1409 `\-\-\-X\-\-\(aq `\-\-\-\-\-\-\(aq
1416 Here, the merge commits \fBO\fR and \fBP\fR contribute extra noise, as they did not actually contribute a change to \fBfile\&.txt\fR\&. They only merged a topic that was based on an older version of \fBfile\&.txt\fR\&. This is a common issue in repositories using a workflow where many contributors work in parallel and merge their topic branches along a single trunk: many unrelated merges appear in the \fB\-\-full\-history\fR results\&.
1418 When using the \fB\-\-simplify\-merges\fR option, the commits \fBO\fR and \fBP\fR disappear from the results\&. This is because the rewritten second parents of \fBO\fR and \fBP\fR are reachable from their first parents\&. Those edges are removed and then the commits look like single\-parent commits that are TREESAME to their parent\&. This also happens to the commit \fBN\fR, resulting in a history view as follows:
1424 \&.\-A\-\-\-M\-\-\&.
1436 In this view, we see all of the important single\-parent changes from \fBA\fR, \fBB\fR, and \fBX\fR\&. We also see the carefully\-resolved merge \fBM\fR and the not\-so\-carefully\-resolved merge \fBR\fR\&. This is usually enough information to determine why the commits \fBA\fR and \fBB\fR "disappeared" from history in the default view\&. However, there are a few issues with this approach\&.
1438 The first issue is performance\&. Unlike any previous option, the \fB\-\-simplify\-merges\fR option requires walking the entire commit history before returning a single result\&. This can make the option difficult to use for very large repositories\&.
1440 The second issue is one of auditing\&. When many contributors are working on the same repository, it is important which merge commits introduced a change into an important branch\&. The problematic merge \fBR\fR above is not likely to be the merge commit that was used to merge into an important branch\&. Instead, the merge \fBN\fR was used to merge \fBR\fR and \fBX\fR into the important branch\&. This commit may have information about why the change \fBX\fR came to override the changes from \fBA\fR and \fBB\fR in its commit message\&.
1444 In addition to the commits shown in the default history, show each merge commit that is not TREESAME to its first parent but is TREESAME to a later parent\&.
1446 When a merge commit is included by
1447 \fB\-\-show\-pulls\fR, the merge is treated as if it "pulled" the change from another branch\&. When using
1448 \fB\-\-show\-pulls\fR
1449 on this example (and no other options) the resulting graph is:
1455 I\-\-\-X\-\-\-R\-\-\-N
1461 Here, the merge commits
1465 are included because they pulled the commits
1469 into the base branch, respectively\&. These merges are the reason the commits
1473 do not appear in the default history\&.
1476 \fB\-\-show\-pulls\fR
1478 \fB\-\-simplify\-merges\fR, the graph includes all of the necessary information:
1484 \&.\-A\-\-\-M\-\-\&. N
1498 \fBR\fR, the edge from
1502 was simplified away\&. However,
1504 still appears in the history as an important commit because it "pulled" the change
1506 into the main branch\&.
1509 The \fB\-\-simplify\-by\-decoration\fR option allows you to view only the big picture of the topology of the history, by omitting commits that are not referenced by tags\&. Commits are marked as !TREESAME (in other words, kept after history simplification rules described above) if (1) they are referenced by tags, or (2) they change the contents of the paths given on the command line\&. All other commits are marked as TREESAME (subject to be simplified away)\&.
1510 .SS "Commit Ordering"
1512 By default, the commits are shown in reverse chronological order\&.
1516 Show no parents before all of its children are shown, but otherwise show commits in the commit timestamp order\&.
1519 \-\-author\-date\-order
1521 Show no parents before all of its children are shown, but otherwise show commits in the author timestamp order\&.
1526 Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed\&.
1528 For example, in a commit history like this:
1534 \-\-\-1\-\-\-\-2\-\-\-\-4\-\-\-\-7
1536 3\-\-\-\-5\-\-\-\-6\-\-\-\-8\-\-\-
1542 where the numbers denote the order of commit timestamps,
1545 \fB\-\-date\-order\fR
1546 show the commits in the timestamp order: 8 7 6 5 4 3 2 1\&.
1549 \fB\-\-topo\-order\fR, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5 3 1); some older commits are shown before newer ones in order to avoid showing the commits from two parallel development track mixed together\&.
1554 Output the commits chosen to be shown (see Commit Limiting section above) in reverse order\&. Cannot be combined with
1555 \fB\-\-walk\-reflogs\fR\&.
1557 .SS "Object Traversal"
1559 These options are mostly targeted for packing of Git repositories\&.
1561 \-\-no\-walk[=(sorted|unsorted)]
1563 Only show the given commits, but do not traverse their ancestors\&. This has no effect if a range is specified\&. If the argument
1565 is given, the commits are shown in the order they were given on the command line\&. Otherwise (if
1567 or no argument was given), the commits are shown in reverse chronological order by commit time\&. Cannot be combined with
1573 Overrides a previous
1574 \fB\-\-no\-walk\fR\&.
1576 .SS "Commit Formatting"
1578 \-\-pretty[=<format>], \-\-format=<format>
1580 Pretty\-print the contents of the commit logs in a given format, where
1591 \fIformat:<string>\fR
1593 \fItformat:<string>\fR\&. When
1595 is none of the above, and has
1597 in it, it acts as if
1598 \fI\-\-pretty=tformat:<format>\fR
1601 See the "PRETTY FORMATS" section for some additional details for each format\&. When
1603 part is omitted, it defaults to
1606 Note: you can specify the default pretty format in the repository configuration (see
1607 \fBgit-config\fR(1))\&.
1612 Instead of showing the full 40\-byte hexadecimal commit object name, show a prefix that names the object uniquely\&. "\-\-abbrev=<n>" (which also modifies diff output, if it is displayed) option can be used to specify the minimum length of the prefix\&.
1614 This should make "\-\-pretty=oneline" a whole lot more readable for people using 80\-column terminals\&.
1617 \-\-no\-abbrev\-commit
1619 Show the full 40\-byte hexadecimal commit object name\&. This negates
1620 \fB\-\-abbrev\-commit\fR, either explicit or implied by other options such as "\-\-oneline"\&. It also overrides the
1621 \fBlog\&.abbrevCommit\fR
1627 This is a shorthand for "\-\-pretty=oneline \-\-abbrev\-commit" used together\&.
1630 \-\-encoding=<encoding>
1632 Commit objects record the character encoding used for the log message in their encoding header; this option can be used to tell the command to re\-code the commit log message in the encoding preferred by the user\&. For non plumbing commands this defaults to UTF\-8\&. Note that if an object claims to be encoded in
1634 and we are outputting in
1635 \fBX\fR, we will output the object verbatim; this means that invalid sequences in the original commit may be copied to the output\&. Likewise, if iconv(3) fails to convert the commit, we will quietly output the original object verbatim\&.
1638 \-\-expand\-tabs=<n>, \-\-expand\-tabs, \-\-no\-expand\-tabs
1640 Perform a tab expansion (replace each tab with enough spaces to fill to the next display column that is multiple of
1641 \fI<n>\fR) in the log message before showing it in the output\&.
1642 \fB\-\-expand\-tabs\fR
1643 is a short\-hand for
1644 \fB\-\-expand\-tabs=8\fR, and
1645 \fB\-\-no\-expand\-tabs\fR
1646 is a short\-hand for
1647 \fB\-\-expand\-tabs=0\fR, which disables tab expansion\&.
1649 By default, tabs are expanded in pretty formats that indent the log message by 4 spaces (i\&.e\&.
1650 \fImedium\fR, which is the default,
1658 \fBgit-notes\fR(1)) that annotate the commit, when showing the commit log message\&. This is the default for
1662 \fBgit whatchanged\fR
1663 commands when there is no
1665 \fB\-\-format\fR, or
1667 option given on the command line\&.
1669 By default, the notes shown are from the notes refs listed in the
1670 \fBcore\&.notesRef\fR
1672 \fBnotes\&.displayRef\fR
1673 variables (or corresponding environment overrides)\&. See
1679 argument, use the ref to find the notes to display\&. The ref can specify the full refname when it begins with
1680 \fBrefs/notes/\fR; when it begins with
1685 is prefixed to form a full name of the ref\&.
1687 Multiple \-\-notes options can be combined to control which notes are being displayed\&. Examples: "\-\-notes=foo" will show only notes from "refs/notes/foo"; "\-\-notes=foo \-\-notes" will show both notes from "refs/notes/foo" and from the default notes ref(s)\&.
1692 Do not show notes\&. This negates the above
1694 option, by resetting the list of notes refs from which notes are shown\&. Options are parsed in the order given on the command line, so e\&.g\&. "\-\-notes \-\-notes=foo \-\-no\-notes \-\-notes=bar" will only show notes from "refs/notes/bar"\&.
1697 \-\-show\-notes[=<ref>], \-\-[no\-]standard\-notes
1699 These options are deprecated\&. Use the above \-\-notes/\-\-no\-notes options instead\&.
1704 Check the validity of a signed commit object by passing the signature to
1705 \fBgpg \-\-verify\fR
1706 and show the output\&.
1712 \fB\-\-date=relative\fR\&.
1717 Only takes effect for dates shown in human\-readable format, such as when using
1720 config variable sets a default value for the log command\(cqs
1722 option\&. By default, dates are shown in the original time zone (either committer\(cqs or author\(cqs)\&. If
1724 is appended to the format (e\&.g\&.,
1725 \fBiso\-local\fR), the user\(cqs local time zone is used instead\&.
1727 \fB\-\-date=relative\fR
1728 shows dates relative to the current time, e\&.g\&. \(lq2 hours ago\(rq\&. The
1730 option has no effect for
1731 \fB\-\-date=relative\fR\&.
1733 \fB\-\-date=local\fR
1735 \fB\-\-date=default\-local\fR\&.
1739 \fB\-\-date=iso8601\fR) shows timestamps in a ISO 8601\-like format\&. The differences to the strict ISO 8601 format are:
1743 \h'-04'\(bu\h'+03'\c
1749 a space instead of the
1756 \h'-04'\(bu\h'+03'\c
1762 a space between time and time zone
1767 \h'-04'\(bu\h'+03'\c
1773 no colon between hours and minutes of the time zone
1776 \fB\-\-date=iso\-strict\fR
1778 \fB\-\-date=iso8601\-strict\fR) shows timestamps in strict ISO 8601 format\&.
1782 \fB\-\-date=rfc2822\fR) shows timestamps in RFC 2822 format, often found in email messages\&.
1784 \fB\-\-date=short\fR
1785 shows only the date, but not the time, in
1790 shows the date as seconds since the epoch (1970\-01\-01 00:00:00 UTC), followed by a space, and then the timezone as an offset from UTC (a
1794 with four digits; the first two are hours, and the second two are minutes)\&. I\&.e\&., as if the timestamp were formatted with
1795 \fBstrftime("%s %z")\fR)\&. Note that the
1797 option does not affect the seconds\-since\-epoch value (which is always measured in UTC), but does switch the accompanying timezone value\&.
1799 \fB\-\-date=human\fR
1800 shows the timezone if the timezone does not match the current time\-zone, and doesn\(cqt print the whole date if that matches (ie skip printing year for dates that are "this year", but also skip the whole date itself if it\(cqs in the last few days and we can just say what weekday it was)\&. For older dates the hour and minute is also omitted\&.
1803 shows the date as a Unix epoch timestamp (seconds since 1970)\&. As with
1804 \fB\-\-raw\fR, this is always in UTC and therefore
1808 \fB\-\-date=format:\&.\&.\&.\fR
1812 \fBstrftime\fR, except for %s, %z, and %Z, which are handled internally\&. Use
1813 \fB\-\-date=format:%c\fR
1814 to show the date in your system locale\(cqs preferred format\&. See the
1816 manual for a complete list of format placeholders\&. When using
1817 \fB\-local\fR, the correct syntax is
1818 \fB\-\-date=format\-local:\&.\&.\&.\fR\&.
1820 \fB\-\-date=default\fR
1821 is the default format, and is based on ctime(3) output\&. It shows a single line with three\-letter day of the week, three\-letter month, day\-of\-month, hour\-minute\-seconds in "HH:MM:SS" format, followed by 4\-digit year, plus timezone information, unless the local time zone is used, e\&.g\&.
1822 \fBThu Jan 1 00:00:00 1970 +0000\fR\&.
1827 Print also the parents of the commit (in the form "commit parent\&...")\&. Also enables parent rewriting, see
1828 \fIHistory Simplification\fR
1834 Print also the children of the commit (in the form "commit child\&...")\&. Also enables parent rewriting, see
1835 \fIHistory Simplification\fR
1841 Mark which side of a symmetric difference a commit is reachable from\&. Commits from the left side are prefixed with
1843 and those from the right with
1844 \fB>\fR\&. If combined with
1845 \fB\-\-boundary\fR, those commits are prefixed with
1848 For example, if you have this topology:
1854 y\-\-\-b\-\-\-b branch B
1858 o\-\-\-x\-\-\-a\-\-\-a branch A
1864 you would get an output like this:
1870 $ git rev\-list \-\-left\-right \-\-boundary \-\-pretty=oneline A\&.\&.\&.B
1872 >bbbbbbb\&.\&.\&. 3rd on b
1873 >bbbbbbb\&.\&.\&. 2nd on b
1874 <aaaaaaa\&.\&.\&. 3rd on a
1875 <aaaaaaa\&.\&.\&. 2nd on a
1876 \-yyyyyyy\&.\&.\&. 1st on b
1877 \-xxxxxxx\&.\&.\&. 1st on a
1887 Draw a text\-based graphical representation of the commit history on the left hand side of the output\&. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly\&. Cannot be combined with
1888 \fB\-\-no\-walk\fR\&.
1890 This enables parent rewriting, see
1891 \fIHistory Simplification\fR
1895 \fB\-\-topo\-order\fR
1896 option by default, but the
1897 \fB\-\-date\-order\fR
1898 option may also be specified\&.
1901 \-\-show\-linear\-break[=<barrier>]
1903 When \-\-graph is not used, all history branches are flattened which can make it hard to see that the two consecutive commits do not belong to a linear branch\&. This option puts a barrier in between them in that case\&. If
1905 is specified, it is the string that will be shown instead of the default one\&.
1907 .SH "PRETTY FORMATS"
1909 If the commit is a merge, and if the pretty\-format is not \fIoneline\fR, \fIemail\fR or \fIraw\fR, an additional line is inserted before the \fIAuthor:\fR line\&. This line begins with "Merge: " and the hashes of ancestral commits are printed, separated by spaces\&. Note that the listed commits may not necessarily be the list of the \fBdirect\fR parent commits if you have limited your view of history: for example, if you are only interested in changes related to a certain directory or file\&.
1911 There are several built\-in formats, and you can define additional formats by setting a pretty\&.<name> config option to either another format name, or a \fIformat:\fR string, as described below (see \fBgit-config\fR(1))\&. Here are the details of the built\-in formats:
1915 \h'-04'\(bu\h'+03'\c
1927 <hash> <title\-line>
1933 This is designed to be as compact as possible\&.
1938 \h'-04'\(bu\h'+03'\c
1970 \h'-04'\(bu\h'+03'\c
1984 Date: <author\-date>
2004 <full\-commit\-message>
2013 \h'-04'\(bu\h'+03'\c
2047 <full\-commit\-message>
2056 \h'-04'\(bu\h'+03'\c
2070 AuthorDate: <author\-date>
2072 CommitDate: <committer\-date>
2092 <full\-commit\-message>
2101 \h'-04'\(bu\h'+03'\c
2113 <abbrev\-hash> (<title\-line>, <short\-author\-date>)
2119 This format is used to refer to another commit in a commit message and is the same as
2120 \fB\-\-pretty=\(aqformat:%C(auto)%h (%s, %ad)\(aq\fR\&. By default, the date is formatted with
2121 \fB\-\-date=short\fR
2124 option is explicitly specified\&. As with any
2126 with format placeholders, its output is not affected by other options like
2129 \fB\-\-walk\-reflogs\fR\&.
2134 \h'-04'\(bu\h'+03'\c
2148 Date: <author\-date>
2149 Subject: [PATCH] <title\-line>
2159 <full\-commit\-message>
2168 \h'-04'\(bu\h'+03'\c
2177 \fIemail\fR, but lines in the commit message starting with "From " (preceded by zero or more ">") are quoted with ">" so they aren\(cqt confused as starting a new commit\&.
2182 \h'-04'\(bu\h'+03'\c
2192 format shows the entire commit exactly as stored in the commit object\&. Notably, the hashes are displayed in full, regardless of whether \-\-abbrev or \-\-no\-abbrev are used, and
2194 information show the true parent commits, without taking grafts or history simplification into account\&. Note that this format affects the way commits are displayed, but not the way the diff is shown e\&.g\&. with
2195 \fBgit log \-\-raw\fR\&. To get full object names in a raw diff format, use
2196 \fB\-\-no\-abbrev\fR\&.
2201 \h'-04'\(bu\h'+03'\c
2207 \fIformat:<format\-string>\fR
2210 \fIformat:<format\-string>\fR
2211 format allows you to specify which information you want to show\&. It works a little bit like printf format, with the notable exception that you get a newline with
2217 \fIformat:"The author of %h was %an, %ar%nThe title was >>%s<<%n"\fR
2218 would show something like this:
2224 The author of fe6e0ee was Junio C Hamano, 23 hours ago
2225 The title was >>t4119: test autocomputing \-p<n> for traditional diff input\&.<<
2231 The placeholders are:
2235 \h'-04'\(bu\h'+03'\c
2241 Placeholders that expand to a single literal character:
2256 print a byte from a hex code
2262 \h'-04'\(bu\h'+03'\c
2268 Placeholders that affect formatting of later placeholders:
2277 switch color to green
2282 switch color to blue
2292 color specification, as described under Values in the "CONFIGURATION FILE" section of
2293 \fBgit-config\fR(1)\&. By default, colors are shown only when enabled for log output (by
2295 \fBcolor\&.ui\fR, or
2296 \fB\-\-color\fR, and respecting the
2298 settings of the former if we are going to a terminal)\&.
2299 \fB%C(auto,\&.\&.\&.)\fR
2300 is accepted as a historical synonym for the default (e\&.g\&.,
2301 \fB%C(auto,red)\fR)\&. Specifying
2302 \fB%C(always,\&.\&.\&.)\fR
2303 will show the colors even when color is not otherwise enabled (though consider just using
2304 \fB\-\-color=always\fR
2305 to enable color for the whole output, including this format and anything else git might color)\&.
2308 \fB%C(auto)\fR) will turn on auto coloring on the next placeholders until the color is switched again\&.
2313 left (\fB<\fR), right (\fB>\fR) or boundary (\fB\-\fR) mark
2316 \fI%w([<w>[,<i1>[,<i2>]]])\fR
2318 switch line wrapping, like the \-w option of
2319 \fBgit-shortlog\fR(1)\&.
2322 \fI%<( <N> [,trunc|ltrunc|mtrunc])\fR
2324 make the next placeholder take at least N column widths, padding spaces on the right if necessary\&. Optionally truncate (with ellipsis
2325 \fI\&.\&.\fR) at the left (ltrunc)
2326 \fB\&.\&.ft\fR, the middle (mtrunc)
2327 \fBmi\&.\&.le\fR, or the end (trunc)
2328 \fBrig\&.\&.\fR, if the output is longer than N columns\&. Note 1: that truncating only works correctly with N >= 2\&. Note 2: spaces around the N and M (see below) values are optional\&. Note 3: Emojis and other wide characters will take two display columns, which may over\-run column boundaries\&. Note 4: decomposed character combining marks may be misplaced at padding boundaries\&.
2333 make the next placeholder take at least until Mth display column, padding spaces on the right if necessary\&. Use negative M values for column positions measured from the right hand edge of the terminal window\&.
2336 \fI%>( <N> )\fR, \fI%>|( <M> )\fR
2341 respectively, but padding spaces on the left
2344 \fI%>>( <N> )\fR, \fI%>>|( <M> )\fR
2349 respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces
2352 \fI%><( <N> )\fR, \fI%><|( <M> )\fR
2357 respectively, but padding both sides (i\&.e\&. the text is centered)
2363 \h'-04'\(bu\h'+03'\c
2369 Placeholders that expand to information extracted from the commit:
2378 abbreviated commit hash
2388 abbreviated tree hash
2398 abbreviated parent hashes
2408 author name (respecting \&.mailmap, see
2409 \fBgit-shortlog\fR(1)
2421 author email (respecting \&.mailmap, see
2422 \fBgit-shortlog\fR(1)
2429 author email local\-part (the part before the
2436 author local\-part (see
2437 \fI%al\fR) respecting \&.mailmap, see
2438 \fBgit-shortlog\fR(1)
2445 author date (format respects \-\-date= option)
2450 author date, RFC2822 style
2455 author date, relative
2460 author date, UNIX timestamp
2465 author date, ISO 8601\-like format
2470 author date, strict ISO 8601 format
2475 author date, short format (\fBYYYY\-MM\-DD\fR)
2480 author date, human style (like the
2481 \fB\-\-date=human\fR
2483 \fBgit-rev-list\fR(1))
2493 committer name (respecting \&.mailmap, see
2494 \fBgit-shortlog\fR(1)
2506 committer email (respecting \&.mailmap, see
2507 \fBgit-shortlog\fR(1)
2514 committer email local\-part (the part before the
2521 committer local\-part (see
2522 \fI%cl\fR) respecting \&.mailmap, see
2523 \fBgit-shortlog\fR(1)
2530 committer date (format respects \-\-date= option)
2535 committer date, RFC2822 style
2540 committer date, relative
2545 committer date, UNIX timestamp
2550 committer date, ISO 8601\-like format
2555 committer date, strict ISO 8601 format
2560 committer date, short format (\fBYYYY\-MM\-DD\fR)
2565 committer date, human style (like the
2566 \fB\-\-date=human\fR
2568 \fBgit-rev-list\fR(1))
2573 ref names, like the \-\-decorate option of
2579 ref names without the " (", ")" wrapping\&.
2582 \fI%(describe[:options])\fR
2584 human\-readable name, like
2585 \fBgit-describe\fR(1); empty string for undescribable commits\&. The
2587 string may be followed by a colon and zero or more comma\-separated options\&. Descriptions can be inconsistent when tags are added or removed at the same time\&.
2591 \h'-04'\(bu\h'+03'\c
2597 \fItags[=<bool\-value>]\fR: Instead of only considering annotated tags, consider lightweight tags as well\&.
2602 \h'-04'\(bu\h'+03'\c
2608 \fIabbrev=<number>\fR: Instead of using the default number of hexadecimal digits (which will vary according to the number of objects in the repository with a default of 7) of the abbreviated object name, use <number> digits, or as many digits as needed to form a unique object name\&.
2613 \h'-04'\(bu\h'+03'\c
2619 \fImatch=<pattern>\fR: Only consider tags matching the given
2621 pattern, excluding the "refs/tags/" prefix\&.
2626 \h'-04'\(bu\h'+03'\c
2632 \fIexclude=<pattern>\fR: Do not consider tags matching the given
2634 pattern, excluding the "refs/tags/" prefix\&.
2640 ref name given on the command line by which the commit was reached (like
2641 \fBgit log \-\-source\fR), only works with
2657 sanitized subject line, suitable for a filename
2667 raw body (unwrapped subject and body)
2677 raw verification message from GPG for a signed commit
2682 show "G" for a good (valid) signature, "B" for a bad signature, "U" for a good signature with unknown validity, "X" for a good signature that has expired, "Y" for a good signature made by an expired key, "R" for a good signature made by a revoked key, "E" if the signature cannot be checked (e\&.g\&. missing key) and "N" for no signature
2687 show the name of the signer for a signed commit
2692 show the key used to sign a signed commit
2697 show the fingerprint of the key used to sign a signed commit
2702 show the fingerprint of the primary key whose subkey was used to sign a signed commit
2707 show the trust level for the key used to sign a signed commit
2712 reflog selector, e\&.g\&.,
2713 \fBrefs/stash@{1}\fR
2715 \fBrefs/stash@{2 minutes ago}\fR; the format follows the rules described for the
2717 option\&. The portion before the
2719 is the refname as given on the command line (so
2720 \fBgit log \-g refs/heads/master\fR
2722 \fBrefs/heads/master@{0}\fR)\&.
2727 shortened reflog selector; same as
2728 \fB%gD\fR, but the refname portion is shortened for human readability (so
2729 \fBrefs/heads/master\fR
2736 reflog identity name
2741 reflog identity name (respecting \&.mailmap, see
2742 \fBgit-shortlog\fR(1)
2749 reflog identity email
2754 reflog identity email (respecting \&.mailmap, see
2755 \fBgit-shortlog\fR(1)
2765 \fI%(trailers[:options])\fR
2767 display the trailers of the body as interpreted by
2768 \fBgit-interpret-trailers\fR(1)\&. The
2770 string may be followed by a colon and zero or more comma\-separated options\&. If any option is provided multiple times the last occurrence wins\&.
2774 \h'-04'\(bu\h'+03'\c
2780 \fIkey=<key>\fR: only show trailers with specified <key>\&. Matching is done case\-insensitively and trailing colon is optional\&. If option is given multiple times trailer lines matching any of the keys are shown\&. This option automatically enables the
2782 option so that non\-trailer lines in the trailer block are hidden\&. If that is not desired it can be disabled with
2783 \fBonly=false\fR\&. E\&.g\&.,
2784 \fB%(trailers:key=Reviewed\-by)\fR
2785 shows trailer lines with key
2786 \fBReviewed\-by\fR\&.
2791 \h'-04'\(bu\h'+03'\c
2797 \fIonly[=<bool>]\fR: select whether non\-trailer lines from the trailer block should be included\&.
2802 \h'-04'\(bu\h'+03'\c
2808 \fIseparator=<sep>\fR: specify a separator inserted between trailer lines\&. When this option is not given each trailer line is terminated with a line feed character\&. The string <sep> may contain the literal formatting codes described above\&. To use comma as separator one must use
2810 as it would otherwise be parsed as next option\&. E\&.g\&.,
2811 \fB%(trailers:key=Ticket,separator=%x2C )\fR
2812 shows all trailer lines whose key is "Ticket" separated by a comma and a space\&.
2817 \h'-04'\(bu\h'+03'\c
2823 \fIunfold[=<bool>]\fR: make it behave as if interpret\-trailer\(cqs
2825 option was given\&. E\&.g\&.,
2826 \fB%(trailers:only,unfold=true)\fR
2827 unfolds and shows all trailer lines\&.
2832 \h'-04'\(bu\h'+03'\c
2838 \fIkeyonly[=<bool>]\fR: only show the key part of the trailer\&.
2843 \h'-04'\(bu\h'+03'\c
2849 \fIvalueonly[=<bool>]\fR: only show the value part of the trailer\&.
2854 \h'-04'\(bu\h'+03'\c
2860 \fIkey_value_separator=<sep>\fR: specify a separator inserted between trailer lines\&. When this option is not given each trailer key\-value pair is separated by ": "\&. Otherwise it shares the same semantics as
2861 \fIseparator=<sep>\fR
2872 .nr an-no-space-flag 1
2880 Some placeholders may depend on other options given to the revision traversal engine\&. For example, the \fB%g*\fR reflog options will insert an empty string unless we are traversing reflog entries (e\&.g\&., by \fBgit log \-g\fR)\&. The \fB%d\fR and \fB%D\fR placeholders will use the "short" decoration format if \fB\-\-decorate\fR was not already provided on the command line\&.
2884 The boolean options accept an optional value \fB[=<bool\-value>]\fR\&. The values \fBtrue\fR, \fBfalse\fR, \fBon\fR, \fBoff\fR etc\&. are all accepted\&. See the "boolean" sub\-section in "EXAMPLES" in \fBgit-config\fR(1)\&. If a boolean option is given with no value, it\(cqs enabled\&.
2886 If you add a \fB+\fR (plus sign) after \fI%\fR of a placeholder, a line\-feed is inserted immediately before the expansion if and only if the placeholder expands to a non\-empty string\&.
2888 If you add a \fB\-\fR (minus sign) after \fI%\fR of a placeholder, all consecutive line\-feeds immediately preceding the expansion are deleted if and only if the placeholder expands to an empty string\&.
2890 If you add a ` ` (space) after \fI%\fR of a placeholder, a space is inserted immediately before the expansion if and only if the placeholder expands to a non\-empty string\&.
2894 \h'-04'\(bu\h'+03'\c
2904 format works exactly like
2905 \fIformat:\fR, except that it provides "terminator" semantics instead of "separator" semantics\&. In other words, each commit has the message terminator character (usually a newline) appended, rather than a separator placed between entries\&. This means that the final entry of a single\-line format will be properly terminated with a new line, just as the "oneline" format does\&. For example:
2911 $ git log \-2 \-\-pretty=format:%h 4da45bef \e
2912 | perl \-pe \(aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\(aq
2914 7134973 \-\- NO NEWLINE
2916 $ git log \-2 \-\-pretty=tformat:%h 4da45bef \e
2917 | perl \-pe \(aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\(aq
2925 In addition, any unrecognized string that has a
2927 in it is interpreted as if it has
2929 in front of it\&. For example, these two are equivalent:
2935 $ git log \-2 \-\-pretty=tformat:%h 4da45bef
2936 $ git log \-2 \-\-pretty=%h 4da45bef
2943 .SH "DIFF FORMATTING"
2945 By default, \fBgit log\fR does not generate any diff output\&. The options below can be used to show the changes made by each commit\&.
2947 Note that unless one of \fB\-\-diff\-merges\fR variants (including short \fB\-m\fR, \fB\-c\fR, and \fB\-\-cc\fR options) is explicitly given, merge commits will not show a diff, even if a diff format like \fB\-\-patch\fR is selected, nor will they match search options like \fB\-S\fR\&. The exception is when \fB\-\-first\-parent\fR is in use, in which case \fBfirst\-parent\fR is the default format\&.
2951 Generate patch (see section titled
2952 "Generating patch text with \-p")\&.
2957 Suppress diff output\&. Useful for commands like
2959 that show the patch by default, or to cancel the effect of
2963 \-\-diff\-merges=(off|none|on|first\-parent|1|separate|m|combined|c|dense\-combined|cc|remerge|r), \-\-no\-diff\-merges
2965 Specify diff format to be used for merge commits\&. Default is
2968 \fB\-\-first\-parent\fR
2969 is in use, in which case
2973 \-\-diff\-merges=(off|none), \-\-no\-diff\-merges
2975 Disable output of diffs for merge commits\&. Useful to override implied value\&.
2978 \-\-diff\-merges=on, \-\-diff\-merges=m, \-m
2980 This option makes diff output for merge commits to be shown in the default format\&.
2982 will produce the output only if
2984 is given as well\&. The default format could be changed using
2985 \fBlog\&.diffMerges\fR
2986 configuration parameter, which default value is
2990 \-\-diff\-merges=first\-parent, \-\-diff\-merges=1
2992 This option makes merge commits show the full diff with respect to the first parent only\&.
2995 \-\-diff\-merges=separate
2997 This makes merge commits show the full diff with respect to each of the parents\&. Separate log entry and diff is generated for each parent\&.
3000 \-\-diff\-merges=remerge, \-\-diff\-merges=r, \-\-remerge\-diff
3002 With this option, two\-parent merge commits are remerged to create a temporary tree object \(em potentially containing files with conflict markers and such\&. A diff is then shown between that temporary tree and the actual merge commit\&.
3004 The output emitted when this option is used is subject to change, and so is its interaction with other options (unless explicitly documented)\&.
3007 \-\-diff\-merges=combined, \-\-diff\-merges=c, \-c
3009 With this option, diff output for a merge commit shows the differences from each of the parents to the merge result simultaneously instead of showing pairwise diff between a parent and the result one at a time\&. Furthermore, it lists only files which were modified from all parents\&.
3015 \-\-diff\-merges=dense\-combined, \-\-diff\-merges=cc, \-\-cc
3017 With this option the output produced by
3018 \fB\-\-diff\-merges=combined\fR
3019 is further compressed by omitting uninteresting hunks whose contents in the parents have only two variants and the merge result picks one of them without modification\&.
3026 \-\-combined\-all\-paths
3028 This flag causes combined diffs (used for merge commits) to list the name of the file from all parents\&. It thus only has effect when
3029 \fB\-\-diff\-merges=[dense\-]combined\fR
3030 is in use, and is likely only useful if filename changes are detected (i\&.e\&. when either rename or copy detection have been requested)\&.
3033 \-U<n>, \-\-unified=<n>
3035 Generate diffs with <n> lines of context instead of the usual three\&. Implies
3041 Output to a specific file instead of stdout\&.
3044 \-\-output\-indicator\-new=<char>, \-\-output\-indicator\-old=<char>, \-\-output\-indicator\-context=<char>
3046 Specify the character used to indicate new, old or context lines in the generated patch\&. Normally they are
3049 and \(aq \(aq respectively\&.
3054 For each commit, show a summary of changes using the raw diff format\&. See the "RAW OUTPUT FORMAT" section of
3055 \fBgit-diff\fR(1)\&. This is different from showing the log itself in raw format, which you can achieve with
3056 \fB\-\-format=raw\fR\&.
3059 \-\-patch\-with\-raw
3062 \fB\-p \-\-raw\fR\&.
3067 Show the tree objects in the diff output\&.
3070 \-\-indent\-heuristic
3072 Enable the heuristic that shifts diff hunk boundaries to make patches easier to read\&. This is the default\&.
3075 \-\-no\-indent\-heuristic
3077 Disable the indent heuristic\&.
3082 Spend extra time to make sure the smallest possible diff is produced\&.
3087 Generate a diff using the "patience diff" algorithm\&.
3092 Generate a diff using the "histogram diff" algorithm\&.
3097 Generate a diff using the "anchored diff" algorithm\&.
3099 This option may be specified more than once\&.
3101 If a line exists in both the source and destination, exists only once, and starts with this text, this algorithm attempts to prevent it from appearing as a deletion or addition in the output\&. It uses the "patience diff" algorithm internally\&.
3104 \-\-diff\-algorithm={patience|minimal|histogram|myers}
3106 Choose a diff algorithm\&. The variants are as follows:
3108 \fBdefault\fR, \fBmyers\fR
3110 The basic greedy diff algorithm\&. Currently, this is the default\&.
3115 Spend extra time to make sure the smallest possible diff is produced\&.
3120 Use "patience diff" algorithm when generating patches\&.
3125 This algorithm extends the patience algorithm to "support low\-occurrence common elements"\&.
3128 For instance, if you configured the
3129 \fBdiff\&.algorithm\fR
3130 variable to a non\-default value and want to use the default one, then you have to use
3131 \fB\-\-diff\-algorithm=default\fR
3135 \-\-stat[=<width>[,<name\-width>[,<count>]]]
3137 Generate a diffstat\&. By default, as much space as necessary will be used for the filename part, and the rest for the graph part\&. Maximum width defaults to terminal width, or 80 columns if not connected to a terminal, and can be overridden by
3138 \fB<width>\fR\&. The width of the filename part can be limited by giving another width
3140 after a comma\&. The width of the graph part can be limited by using
3141 \fB\-\-stat\-graph\-width=<width>\fR
3142 (affects all commands generating a stat graph) or by setting
3143 \fBdiff\&.statGraphWidth=<width>\fR
3145 \fBgit format\-patch\fR)\&. By giving a third parameter
3146 \fB<count>\fR, you can limit the output to the first
3150 if there are more\&.
3152 These parameters can also be set individually with
3153 \fB\-\-stat\-width=<width>\fR,
3154 \fB\-\-stat\-name\-width=<name\-width>\fR
3156 \fB\-\-stat\-count=<count>\fR\&.
3159 \-\-compact\-summary
3161 Output a condensed summary of extended header information such as file creations or deletions ("new" or "gone", optionally "+l" if it\(cqs a symlink) and mode changes ("+x" or "\-x" for adding or removing executable bit respectively) in diffstat\&. The information is put between the filename part and the graph part\&. Implies
3168 \fB\-\-stat\fR, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly\&. For binary files, outputs two
3176 Output only the last line of the
3178 format containing total number of modified files, as well as number of added and deleted lines\&.
3181 \-X[<param1,param2,\&...>], \-\-dirstat[=<param1,param2,\&...>]
3183 Output the distribution of relative amount of changes for each sub\-directory\&. The behavior of
3185 can be customized by passing it a comma separated list of parameters\&. The defaults are controlled by the
3186 \fBdiff\&.dirstat\fR
3187 configuration variable (see
3188 \fBgit-config\fR(1))\&. The following parameters are available:
3192 Compute the dirstat numbers by counting the lines that have been removed from the source, or added to the destination\&. This ignores the amount of pure code movements within a file\&. In other words, rearranging lines in a file is not counted as much as other changes\&. This is the default behavior when no parameter is given\&.
3197 Compute the dirstat numbers by doing the regular line\-based diff analysis, and summing the removed/added line counts\&. (For binary files, count 64\-byte chunks instead, since binary files have no natural concept of lines)\&. This is a more expensive
3201 behavior, but it does count rearranged lines within a file as much as other changes\&. The resulting output is consistent with what you get from the other
3208 Compute the dirstat numbers by counting the number of files changed\&. Each changed file counts equally in the dirstat analysis\&. This is the computationally cheapest
3210 behavior, since it does not have to look at the file contents at all\&.
3215 Count changes in a child directory for the parent directory as well\&. Note that when using
3216 \fBcumulative\fR, the sum of the percentages reported may exceed 100%\&. The default (non\-cumulative) behavior can be specified with the
3223 An integer parameter specifies a cut\-off percent (3% by default)\&. Directories contributing less than this percentage of the changes are not shown in the output\&.
3226 Example: The following will count changed files, while ignoring directories with less than 10% of the total amount of changed files, and accumulating child directory counts in the parent directories:
3227 \fB\-\-dirstat=files,10,cumulative\fR\&.
3232 Synonym for \-\-dirstat=cumulative
3235 \-\-dirstat\-by\-file[=<param1,param2>\&...]
3237 Synonym for \-\-dirstat=files,param1,param2\&...
3242 Output a condensed summary of extended header information such as creations, renames and mode changes\&.
3245 \-\-patch\-with\-stat
3248 \fB\-p \-\-stat\fR\&.
3253 Separate the commits with NULs instead of with new newlines\&.
3259 has been given, do not munge pathnames and use NULs as output field terminators\&.
3261 Without this option, pathnames with "unusual" characters are quoted as explained for the configuration variable
3262 \fBcore\&.quotePath\fR
3264 \fBgit-config\fR(1))\&.
3269 Show only names of changed files\&. The file names are often encoded in UTF\-8\&. For more information see the discussion about encoding in the
3276 Show only names and status of changed files\&. See the description of the
3277 \fB\-\-diff\-filter\fR
3278 option on what the status letters mean\&. Just like
3279 \fB\-\-name\-only\fR
3280 the file names are often encoded in UTF\-8\&.
3283 \-\-submodule[=<format>]
3285 Specify how differences in submodules are shown\&. When specifying
3286 \fB\-\-submodule=short\fR
3289 format is used\&. This format just shows the names of the commits at the beginning and end of the range\&. When
3292 \fB\-\-submodule=log\fR
3295 format is used\&. This format lists the commits in the range like
3296 \fBgit-submodule\fR(1)
3299 \fB\-\-submodule=diff\fR
3302 format is used\&. This format shows an inline diff of the changes in the submodule contents between the commit range\&. Defaults to
3303 \fBdiff\&.submodule\fR
3306 format if the config option is unset\&.
3311 Show colored diff\&.
3314 \fI=<when>\fR) is the same as
3315 \fB\-\-color=always\fR\&.
3325 Turn off colored diff\&. It is the same as
3326 \fB\-\-color=never\fR\&.
3329 \-\-color\-moved[=<mode>]
3331 Moved lines of code are colored differently\&. The <mode> defaults to
3333 if the option is not given and to
3335 if the option with no mode is given\&. The mode must be one of:
3339 Moved lines are not highlighted\&.
3345 \fBzebra\fR\&. This may change to a more sensible mode in the future\&.
3350 Any line that is added in one location and was removed in another location will be colored with
3351 \fIcolor\&.diff\&.newMoved\fR\&. Similarly
3352 \fIcolor\&.diff\&.oldMoved\fR
3353 will be used for removed lines that are added somewhere else in the diff\&. This mode picks up any moved line, but it is not very useful in a review to determine if a block of code was moved without permutation\&.
3358 Blocks of moved text of at least 20 alphanumeric characters are detected greedily\&. The detected blocks are painted using either the
3359 \fIcolor\&.diff\&.{old,new}Moved\fR
3360 color\&. Adjacent blocks cannot be told apart\&.
3365 Blocks of moved text are detected as in
3367 mode\&. The blocks are painted using either the
3368 \fIcolor\&.diff\&.{old,new}Moved\fR
3370 \fIcolor\&.diff\&.{old,new}MovedAlternative\fR\&. The change between the two colors indicates that a new block was detected\&.
3376 \fIzebra\fR, but additional dimming of uninteresting parts of moved code is performed\&. The bordering lines of two adjacent blocks are considered interesting, the rest is uninteresting\&.
3378 is a deprecated synonym\&.
3382 \-\-no\-color\-moved
3384 Turn off move detection\&. This can be used to override configuration settings\&. It is the same as
3385 \fB\-\-color\-moved=no\fR\&.
3388 \-\-color\-moved\-ws=<modes>
3390 This configures how whitespace is ignored when performing the move detection for
3391 \fB\-\-color\-moved\fR\&. These modes can be given as a comma separated list:
3395 Do not ignore whitespace when performing move detection\&.
3398 ignore\-space\-at\-eol
3400 Ignore changes in whitespace at EOL\&.
3403 ignore\-space\-change
3405 Ignore changes in amount of whitespace\&. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent\&.
3410 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3413 allow\-indentation\-change
3415 Initially ignore any whitespace in the move detection, then group the moved code blocks only into a block if the change in whitespace is the same per line\&. This is incompatible with the other modes\&.
3419 \-\-no\-color\-moved\-ws
3421 Do not ignore whitespace when performing move detection\&. This can be used to override configuration settings\&. It is the same as
3422 \fB\-\-color\-moved\-ws=no\fR\&.
3425 \-\-word\-diff[=<mode>]
3427 Show a word diff, using the <mode> to delimit changed words\&. By default, words are delimited by whitespace; see
3428 \fB\-\-word\-diff\-regex\fR
3429 below\&. The <mode> defaults to
3430 \fIplain\fR, and must be one of:
3434 Highlight changed words using only colors\&. Implies
3443 \fB{+added+}\fR\&. Makes no attempts to escape the delimiters if they appear in the input, so the output may be ambiguous\&.
3448 Use a special line\-based format intended for script consumption\&. Added/removed/unchanged runs are printed in the usual unified diff format, starting with a
3449 \fB+\fR/\fB\-\fR/` ` character at the beginning of the line and extending to the end of the line\&. Newlines in the input are represented by a tilde
3451 on a line of its own\&.
3456 Disable word diff again\&.
3459 Note that despite the name of the first mode, color is used to highlight the changed parts in all modes if enabled\&.
3462 \-\-word\-diff\-regex=<regex>
3464 Use <regex> to decide what a word is, instead of considering runs of non\-whitespace to be a word\&. Also implies
3465 \fB\-\-word\-diff\fR
3466 unless it was already enabled\&.
3468 Every non\-overlapping match of the <regex> is considered a word\&. Anything between these matches is considered whitespace and ignored(!) for the purposes of finding differences\&. You may want to append
3470 to your regular expression to make sure that it matches all non\-whitespace characters\&. A match that contains a newline is silently truncated(!) at the newline\&.
3473 \fB\-\-word\-diff\-regex=\&.\fR
3474 will treat each character as a word and, correspondingly, show differences character by character\&.
3476 The regex can also be set via a diff driver or configuration option, see
3477 \fBgitattributes\fR(5)
3479 \fBgit-config\fR(1)\&. Giving it explicitly overrides any diff driver or configuration setting\&. Diff drivers override configuration settings\&.
3482 \-\-color\-words[=<regex>]
3485 \fB\-\-word\-diff=color\fR
3486 plus (if a regex was specified)
3487 \fB\-\-word\-diff\-regex=<regex>\fR\&.
3492 Turn off rename detection, even when the configuration file gives the default to do so\&.
3495 \-\-[no\-]rename\-empty
3497 Whether to use empty blobs as rename source\&.
3502 Warn if changes introduce conflict markers or whitespace errors\&. What are considered whitespace errors is controlled by
3503 \fBcore\&.whitespace\fR
3504 configuration\&. By default, trailing whitespaces (including lines that consist solely of whitespaces) and a space character that is immediately followed by a tab character inside the initial indent of the line are considered whitespace errors\&. Exits with non\-zero status if problems are found\&. Not compatible with \-\-exit\-code\&.
3507 \-\-ws\-error\-highlight=<kind>
3509 Highlight whitespace errors in the
3514 lines of the diff\&. Multiple values are separated by comma,
3516 resets previous values,
3523 \fBold,new,context\fR\&. When this option is not given, and the configuration variable
3524 \fBdiff\&.wsErrorHighlight\fR
3525 is not set, only whitespace errors in
3527 lines are highlighted\&. The whitespace errors are colored with
3528 \fBcolor\&.diff\&.whitespace\fR\&.
3533 Instead of the first handful of characters, show the full pre\- and post\-image blob object names on the "index" line when generating patch format output\&.
3539 \fB\-\-full\-index\fR, output a binary diff that can be applied with
3540 \fBgit\-apply\fR\&. Implies
3546 Instead of showing the full 40\-byte hexadecimal object name in diff\-raw format output and diff\-tree header lines, show the shortest prefix that is at least
3548 hexdigits long that uniquely refers the object\&. In diff\-patch output format,
3549 \fB\-\-full\-index\fR
3550 takes higher precedence, i\&.e\&. if
3551 \fB\-\-full\-index\fR
3552 is specified, full blob names will be shown regardless of
3553 \fB\-\-abbrev\fR\&. Non default number of digits can be specified with
3554 \fB\-\-abbrev=<n>\fR\&.
3557 \-B[<n>][/<m>], \-\-break\-rewrites[=[<n>][/<m>]]
3559 Break complete rewrite changes into pairs of delete and create\&. This serves two purposes:
3561 It affects the way a change that amounts to a total rewrite of a file not as a series of deletion and insertion mixed together with a very few lines that happen to match textually as the context, but as a single deletion of everything old followed by a single insertion of everything new, and the number
3563 controls this aspect of the \-B option (defaults to 60%)\&.
3565 specifies that less than 30% of the original should remain in the result for Git to consider it a total rewrite (i\&.e\&. otherwise the resulting patch will be a series of deletion and insertion mixed together with context lines)\&.
3567 When used with \-M, a totally\-rewritten file is also considered as the source of a rename (usually \-M only considers a file that disappeared as the source of a rename), and the number
3569 controls this aspect of the \-B option (defaults to 50%)\&.
3571 specifies that a change with addition and deletion compared to 20% or more of the file\(cqs size are eligible for being picked up as a possible source of a rename to another file\&.
3574 \-M[<n>], \-\-find\-renames[=<n>]
3576 If generating diffs, detect and report renames for each commit\&. For following files across renames while traversing history, see
3577 \fB\-\-follow\fR\&. If
3579 is specified, it is a threshold on the similarity index (i\&.e\&. amount of addition/deletions compared to the file\(cqs size)\&. For example,
3581 means Git should consider a delete/add pair to be a rename if more than 90% of the file hasn\(cqt changed\&. Without a
3583 sign, the number is to be read as a fraction, with a decimal point before it\&. I\&.e\&.,
3585 becomes 0\&.5, and is thus the same as
3586 \fB\-M50%\fR\&. Similarly,
3589 \fB\-M5%\fR\&. To limit detection to exact renames, use
3590 \fB\-M100%\fR\&. The default similarity index is 50%\&.
3593 \-C[<n>], \-\-find\-copies[=<n>]
3595 Detect copies as well as renames\&. See also
3596 \fB\-\-find\-copies\-harder\fR\&. If
3598 is specified, it has the same meaning as for
3602 \-\-find\-copies\-harder
3604 For performance reasons, by default,
3606 option finds copies only if the original file of the copy was modified in the same changeset\&. This flag makes the command inspect unmodified files as candidates for the source of copy\&. This is a very expensive operation for large projects, so use it with caution\&. Giving more than one
3608 option has the same effect\&.
3611 \-D, \-\-irreversible\-delete
3613 Omit the preimage for deletes, i\&.e\&. print only the header but not the diff between the preimage and
3614 \fB/dev/null\fR\&. The resulting patch is not meant to be applied with
3617 \fBgit apply\fR; this is solely for people who want to just concentrate on reviewing the text after the change\&. In addition, the output obviously lacks enough information to apply such a patch in reverse, even manually, hence the name of the option\&.
3619 When used together with
3620 \fB\-B\fR, omit also the preimage in the deletion part of a delete/create pair\&.
3629 options involve some preliminary steps that can detect subsets of renames/copies cheaply, followed by an exhaustive fallback portion that compares all remaining unpaired destinations to all relevant sources\&. (For renames, only remaining unpaired sources are relevant; for copies, all original sources are relevant\&.) For N sources and destinations, this exhaustive check is O(N^2)\&. This option prevents the exhaustive portion of rename/copy detection from running if the number of source/destination files involved exceeds the specified number\&. Defaults to diff\&.renameLimit\&. Note that a value of 0 is treated as unlimited\&.
3632 \-\-diff\-filter=[(A|C|D|M|R|T|U|X|B)\&...[*]]
3634 Select only files that are Added (\fBA\fR), Copied (\fBC\fR), Deleted (\fBD\fR), Modified (\fBM\fR), Renamed (\fBR\fR), have their type (i\&.e\&. regular file, symlink, submodule, \&...) changed (\fBT\fR), are Unmerged (\fBU\fR), are Unknown (\fBX\fR), or have had their pairing Broken (\fBB\fR)\&. Any combination of the filter characters (including none) can be used\&. When
3636 (All\-or\-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected\&.
3638 Also, these upper\-case letters can be downcased to exclude\&. E\&.g\&.
3639 \fB\-\-diff\-filter=ad\fR
3640 excludes added and deleted paths\&.
3642 Note that not all diffs can feature all types\&. For instance, copied and renamed entries cannot appear if detection for those types is disabled\&.
3647 Look for differences that change the number of occurrences of the specified string (i\&.e\&. addition/deletion) in a file\&. Intended for the scripter\(cqs use\&.
3649 It is useful when you\(cqre looking for an exact block of code (like a struct), and want to know the history of that block since it first came into being: use the feature iteratively to feed the interesting block in the preimage back into
3650 \fB\-S\fR, and keep going until you get the very first version of the block\&.
3652 Binary files are searched as well\&.
3657 Look for differences whose patch text contains added/removed lines that match <regex>\&.
3659 To illustrate the difference between
3660 \fB\-S<regex> \-\-pickaxe\-regex\fR
3662 \fB\-G<regex>\fR, consider a commit with the following diff in the same file:
3668 + return frotz(nitfol, two\->ptr, 1, 0);
3670 \- hit = frotz(nitfol, mf2\&.ptr, 1, 0);
3677 \fBgit log \-G"frotz\e(nitfol"\fR
3678 will show this commit,
3679 \fBgit log \-S"frotz\e(nitfol" \-\-pickaxe\-regex\fR
3680 will not (because the number of occurrences of that string did not change)\&.
3684 is supplied patches of binary files without a textconv filter will be ignored\&.
3689 \fBgitdiffcore\fR(7)
3690 for more information\&.
3693 \-\-find\-object=<object\-id>
3695 Look for differences that change the number of occurrences of the specified object\&. Similar to
3696 \fB\-S\fR, just the argument is different in that it doesn\(cqt search for a specific string but for a specific object id\&.
3698 The object can be a blob or a submodule commit\&. It implies the
3702 to also find trees\&.
3711 finds a change, show all the changes in that changeset, not just the files that contain the change in <string>\&.
3716 Treat the <string> given to
3718 as an extended POSIX regular expression to match\&.
3723 Control the order in which files appear in the output\&. This overrides the
3724 \fBdiff\&.orderFile\fR
3725 configuration variable (see
3726 \fBgit-config\fR(1))\&. To cancel
3727 \fBdiff\&.orderFile\fR, use
3728 \fB\-O/dev/null\fR\&.
3730 The output order is determined by the order of glob patterns in <orderfile>\&. All files with pathnames that match the first pattern are output first, all files with pathnames that match the second pattern (but not the first) are output next, and so on\&. All files with pathnames that do not match any pattern are output last, as if there was an implicit match\-all pattern at the end of the file\&. If multiple pathnames have the same rank (they match the same pattern but no earlier patterns), their output order relative to each other is the normal order\&.
3732 <orderfile> is parsed as follows:
3736 \h'-04'\(bu\h'+03'\c
3742 Blank lines are ignored, so they can be used as separators for readability\&.
3747 \h'-04'\(bu\h'+03'\c
3753 Lines starting with a hash ("\fB#\fR") are ignored, so they can be used for comments\&. Add a backslash ("\fB\e\fR") to the beginning of the pattern if it starts with a hash\&.
3758 \h'-04'\(bu\h'+03'\c
3764 Each other line contains a single pattern\&.
3767 Patterns have the same syntax and semantics as patterns used for fnmatch(3) without the FNM_PATHNAME flag, except a pathname also matches a pattern if removing any number of the final pathname components matches the pattern\&. For example, the pattern "\fBfoo*bar\fR" matches "\fBfooasdfbar\fR" and "\fBfoo/bar/baz/asdf\fR" but not "\fBfoobarx\fR"\&.
3770 \-\-skip\-to=<file>, \-\-rotate\-to=<file>
3772 Discard the files before the named <file> from the output (i\&.e\&.
3773 \fIskip to\fR), or move them to the end of the output (i\&.e\&.
3774 \fIrotate to\fR)\&. These were invented primarily for use of the
3776 command, and may not be very useful otherwise\&.
3781 Swap two inputs; that is, show differences from index or on\-disk file to tree contents\&.
3784 \-\-relative[=<path>], \-\-no\-relative
3786 When run from a subdirectory of the project, it can be told to exclude changes outside the directory and show pathnames relative to it with this option\&. When you are not in a subdirectory (e\&.g\&. in a bare repository), you can name which subdirectory to make the output relative to by giving a <path> as an argument\&.
3787 \fB\-\-no\-relative\fR
3788 can be used to countermand both
3789 \fBdiff\&.relative\fR
3790 config option and previous
3791 \fB\-\-relative\fR\&.
3796 Treat all files as text\&.
3799 \-\-ignore\-cr\-at\-eol
3801 Ignore carriage\-return at the end of line when doing a comparison\&.
3804 \-\-ignore\-space\-at\-eol
3806 Ignore changes in whitespace at EOL\&.
3809 \-b, \-\-ignore\-space\-change
3811 Ignore changes in amount of whitespace\&. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent\&.
3814 \-w, \-\-ignore\-all\-space
3816 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3819 \-\-ignore\-blank\-lines
3821 Ignore changes whose lines are all blank\&.
3824 \-I<regex>, \-\-ignore\-matching\-lines=<regex>
3826 Ignore changes whose all lines match <regex>\&. This option may be specified more than once\&.
3829 \-\-inter\-hunk\-context=<lines>
3831 Show the context between diff hunks, up to the specified number of lines, thereby fusing hunks that are close to each other\&. Defaults to
3832 \fBdiff\&.interHunkContext\fR
3833 or 0 if the config option is unset\&.
3836 \-W, \-\-function\-context
3838 Show whole function as context lines for each change\&. The function names are determined in the same way as
3840 works out patch hunk headers (see
3841 \fIDefining a custom hunk\-header\fR
3843 \fBgitattributes\fR(5))\&.
3848 Allow an external diff helper to be executed\&. If you set an external diff driver with
3849 \fBgitattributes\fR(5), you need to use this option with
3856 Disallow external diff drivers\&.
3859 \-\-textconv, \-\-no\-textconv
3861 Allow (or disallow) external text conversion filters to be run when comparing binary files\&. See
3862 \fBgitattributes\fR(5)
3863 for details\&. Because textconv filters are typically a one\-way conversion, the resulting diff is suitable for human consumption, but cannot be applied\&. For this reason, textconv filters are enabled by default only for
3866 \fBgit-log\fR(1), but not for
3867 \fBgit-format-patch\fR(1)
3868 or diff plumbing commands\&.
3871 \-\-ignore\-submodules[=<when>]
3873 Ignore changes to submodules in the diff generation\&. <when> can be either "none", "untracked", "dirty" or "all", which is the default\&. Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the
3878 \fBgitmodules\fR(5)\&. When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content)\&. Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior until 1\&.7\&.0)\&. Using "all" hides all changes to submodules\&.
3881 \-\-src\-prefix=<prefix>
3883 Show the given source prefix instead of "a/"\&.
3886 \-\-dst\-prefix=<prefix>
3888 Show the given destination prefix instead of "b/"\&.
3893 Do not show any source or destination prefix\&.
3896 \-\-line\-prefix=<prefix>
3898 Prepend an additional prefix to every line of output\&.
3901 \-\-ita\-invisible\-in\-index
3903 By default entries added by "git add \-N" appear as an existing empty file in "git diff" and a new file in "git diff \-\-cached"\&. This option makes the entry appear as a new file in "git diff" and non\-existent in "git diff \-\-cached"\&. This option could be reverted with
3904 \fB\-\-ita\-visible\-in\-index\fR\&. Both options are experimental and could be removed in future\&.
3907 For more detailed explanation on these common options, see also \fBgitdiffcore\fR(7)\&.
3908 .SH "GENERATING PATCH TEXT WITH \-P"
3910 Running \fBgit-diff\fR(1), \fBgit-log\fR(1), \fBgit-show\fR(1), \fBgit-diff-index\fR(1), \fBgit-diff-tree\fR(1), or \fBgit-diff-files\fR(1) with the \fB\-p\fR option produces patch text\&. You can customize the creation of patch text via the \fBGIT_EXTERNAL_DIFF\fR and the \fBGIT_DIFF_OPTS\fR environment variables (see \fBgit\fR(1)), and the \fBdiff\fR attribute (see \fBgitattributes\fR(5))\&.
3912 What the \-p option produces is slightly different from the traditional diff format:
3922 It is preceded with a "git diff" header that looks like this:
3928 diff \-\-git a/file1 b/file2
3938 filenames are the same unless rename/copy is involved\&. Especially, even for a creation or a deletion,
3942 used in place of the
3948 When rename/copy is involved,
3952 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively\&.
3963 It is followed by one or more extended header lines:
3971 deleted file mode <mode>
3972 new file mode <mode>
3977 similarity index <number>
3978 dissimilarity index <number>
3979 index <hash>\&.\&.<hash> <mode>
3985 File modes are printed as 6\-digit octal numbers including the file type and file permission bits\&.
3987 Path names in extended headers do not include the
3993 The similarity index is the percentage of unchanged lines, and the dissimilarity index is the percentage of changed lines\&. It is a rounded down integer, followed by a percent sign\&. The similarity index value of 100% is thus reserved for two equal files, while 100% dissimilarity means that no line from the old file made it into the new one\&.
3995 The index line includes the blob object names before and after the change\&. The <mode> is included if the file mode does not change; otherwise, separate lines indicate the old and the new mode\&.
4006 Pathnames with "unusual" characters are quoted as explained for the configuration variable
4007 \fBcore\&.quotePath\fR
4009 \fBgit-config\fR(1))\&.
4022 files in the output refer to files before the commit, and all the
4024 files refer to files after the commit\&. It is incorrect to apply each change to each file sequentially\&. For example, this patch will swap a and b:
4030 diff \-\-git a/a b/b
4033 diff \-\-git a/b b/a
4050 Hunk headers mention the name of the function to which the hunk applies\&. See "Defining a custom hunk\-header" in
4051 \fBgitattributes\fR(5)
4052 for details of how to tailor to this to specific languages\&.
4054 .SH "COMBINED DIFF FORMAT"
4056 Any diff\-generating command can take the \fB\-c\fR or \fB\-\-cc\fR option to produce a \fIcombined diff\fR when showing a merge\&. This is the default format when showing merges with \fBgit-diff\fR(1) or \fBgit-show\fR(1)\&. Note also that you can give suitable \fB\-\-diff\-merges\fR option to any of these commands to force generation of diffs in specific format\&.
4058 A "combined diff" format looks like this:
4064 diff \-\-combined describe\&.c
4065 index fabadb8,cc95eb0\&.\&.4866510
4066 \-\-\- a/describe\&.c
4068 @@@ \-98,20 \-98,12 +98,20 @@@
4069 return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
4072 \- static void describe(char *arg)
4073 \-static void describe(struct commit *cmit, int last_one)
4074 ++static void describe(char *arg, int last_one)
4076 + unsigned char sha1[20];
4077 + struct commit *cmit;
4078 struct commit_list *list;
4079 static int initialized = 0;
4080 struct commit_name *n;
4082 + if (get_sha1(arg, sha1) < 0)
4083 + usage(describe_usage);
4084 + cmit = lookup_commit_reference(sha1);
4086 + usage(describe_usage);
4090 for_each_ref(get_name);
4106 It is preceded with a "git diff" header, that looks like this (when the
4114 diff \-\-combined file
4120 or like this (when the
4143 It is followed by one or more extended header lines (this example shows a merge with two parents):
4149 index <hash>,<hash>\&.\&.<hash>
4150 mode <mode>,<mode>\&.\&.<mode>
4151 new file mode <mode>
4152 deleted file mode <mode>,<mode>
4159 \fBmode <mode>,<mode>\&.\&.<mode>\fR
4160 line appears only if at least one of the <mode> is different from the rest\&. Extended headers with information about detected contents movement (renames and copying detection) are designed to work with diff of two <tree\-ish> and are not used by combined diff format\&.
4171 It is followed by two\-line from\-file/to\-file header
4184 Similar to two\-line header for traditional
4188 is used to signal created or deleted files\&.
4190 However, if the \-\-combined\-all\-paths option is provided, instead of a two\-line from\-file/to\-file you get a N+1 line from\-file/to\-file header, where N is the number of parents in the merge commit
4205 This extended format can be useful if rename or copy detection is active, to allow you to see the original name of the file in different parents\&.
4216 Chunk header format is modified to prevent people from accidentally feeding it to
4217 \fBpatch \-p1\fR\&. Combined diff format was created for review of merge commit changes, and was not meant to be applied\&. The change is similar to the change in the extended
4225 @@@ <from\-file\-range> <from\-file\-range> <to\-file\-range> @@@
4231 There are (number of parents + 1)
4233 characters in the chunk header for combined diff format\&.
4236 Unlike the traditional \fIunified\fR diff format, which shows two files A and B with a single column that has \fB\-\fR (minus \(em appears in A but removed in B), \fB+\fR (plus \(em missing in A but added to B), or \fB" "\fR (space \(em unchanged) prefix, this format compares two or more files file1, file2,\&... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X\(cqs line is different from it\&.
4238 A \fB\-\fR character in the column N means that the line appears in fileN but it does not appear in the result\&. A \fB+\fR character in the column N means that the line appears in the result, and fileN does not have that line (in other words, the line was added, from the point of view of that parent)\&.
4240 In the above example output, the function signature was changed from both files (hence two \fB\-\fR removals from both file1 and file2, plus \fB++\fR to mean one line that was added does not appear in either file1 or file2)\&. Also eight other lines are the same from file1 but do not appear in file2 (hence prefixed with \fB+\fR)\&.
4242 When shown by \fBgit diff\-tree \-c\fR, it compares the parents of a merge commit with the merge result (i\&.e\&. file1\&.\&.fileN are the parents)\&. When shown by \fBgit diff\-files \-c\fR, it compares the two unresolved merge parents with the working tree file (i\&.e\&. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version")\&.
4245 \fBgit log \-\-no\-merges\fR
4247 Show the whole commit history, but skip any merges
4250 \fBgit log v2\&.6\&.12\&.\&. include/scsi drivers/scsi\fR
4252 Show all commits since version
4254 that changed any file in the
4261 \fBgit log \-\-since="2 weeks ago" \-\- gitk\fR
4263 Show the changes during the last two weeks to the file
4266 is necessary to avoid confusion with the
4272 \fBgit log \-\-name\-status release\&.\&.test\fR
4274 Show the commits that are in the "test" branch but not yet in the "release" branch, along with the list of paths each commit modifies\&.
4277 \fBgit log \-\-follow builtin/rev\-list\&.c\fR
4279 Shows the commits that changed
4280 \fBbuiltin/rev\-list\&.c\fR, including those commits that occurred before the file was given its present name\&.
4283 \fBgit log \-\-branches \-\-not \-\-remotes=origin\fR
4285 Shows all commits that are in any of local branches but not in any of remote\-tracking branches for
4287 (what you have that origin doesn\(cqt)\&.
4290 \fBgit log master \-\-not \-\-remotes=*/master\fR
4292 Shows all commits that are in local master but not in any remote repository master branches\&.
4295 \fBgit log \-p \-m \-\-first\-parent\fR
4297 Shows the history including change diffs, but only from the \(lqmain branch\(rq perspective, skipping commits that come from merged branches, and showing full diffs of changes introduced by the merges\&. This makes sense only when following a strict policy of merging all topic branches when staying on a single integration branch\&.
4300 \fBgit log \-L \(aq/int main/\(aq,/^}/:main\&.c\fR
4302 Shows how the function
4306 evolved over time\&.
4311 Limits the number of commits to show to 3\&.
4315 Git is to some extent character encoding agnostic\&.
4319 \h'-04'\(bu\h'+03'\c
4325 The contents of the blob objects are uninterpreted sequences of bytes\&. There is no encoding translation at the core level\&.
4330 \h'-04'\(bu\h'+03'\c
4336 Path names are encoded in UTF\-8 normalization form C\&. This applies to tree objects, the index file, ref names, as well as path names in command line arguments, environment variables and config files (\fB\&.git/config\fR
4338 \fBgit-config\fR(1)),
4340 \fBgitattributes\fR(5)
4342 \fBgitmodules\fR(5))\&.
4344 Note that Git at the core level treats path names simply as sequences of non\-NUL bytes, there are no path name encoding conversions (except on Mac and Windows)\&. Therefore, using non\-ASCII path names will mostly work even on platforms and file systems that use legacy extended ASCII encodings\&. However, repositories created on such systems will not work properly on UTF\-8\-based systems (e\&.g\&. Linux, Mac, Windows) and vice versa\&. Additionally, many Git\-based tools simply assume path names to be UTF\-8 and will fail to display other encodings correctly\&.
4349 \h'-04'\(bu\h'+03'\c
4355 Commit log messages are typically encoded in UTF\-8, but other extended ASCII encodings are also supported\&. This includes ISO\-8859\-x, CP125x and many others, but
4357 UTF\-16/32, EBCDIC and CJK multi\-byte encodings (GBK, Shift\-JIS, Big5, EUC\-x, CP9xx etc\&.)\&.
4360 Although we encourage that the commit log messages are encoded in UTF\-8, both the core and Git Porcelain are designed not to force UTF\-8 on projects\&. If all participants of a particular project find it more convenient to use legacy encodings, Git does not forbid it\&. However, there are a few things to keep in mind\&.
4372 \fIgit commit\-tree\fR
4373 issues a warning if the commit log message given to it does not look like a valid UTF\-8 string, unless you explicitly say your project uses a legacy encoding\&. The way to say this is to have
4374 \fBi18n\&.commitEncoding\fR
4384 commitEncoding = ISO\-8859\-1
4390 Commit objects created with the above setting record the value of
4391 \fBi18n\&.commitEncoding\fR
4394 header\&. This is to help other people who look at them later\&. Lack of this header implies that the commit log message is encoded in UTF\-8\&.
4408 and friends look at the
4410 header of a commit object, and try to re\-code the log message into UTF\-8 unless otherwise specified\&. You can specify the desired output encoding with
4411 \fBi18n\&.logOutputEncoding\fR
4421 logOutputEncoding = ISO\-8859\-1
4427 If you do not have this configuration variable, the value of
4428 \fBi18n\&.commitEncoding\fR
4432 Note that we deliberately chose not to re\-code the commit log message when a commit is made to force UTF\-8 at the commit object level, because re\-coding to UTF\-8 is not necessarily a reversible operation\&.
4435 See \fBgit-config\fR(1) for core variables and \fBgit-diff\fR(1) for settings related to diff generation\&.
4442 \fIPretty Formats\fR
4443 above\&.) Defaults to
4447 i18n\&.logOutputEncoding
4449 Encoding to use when displaying logs\&. (See
4451 above\&.) Defaults to the value of
4452 \fBi18n\&.commitEncoding\fR
4453 if set, and UTF\-8 otherwise\&.
4456 Everything above this line in this section isn\(cqt included from the \fBgit-config\fR(1) documentation\&. The content that follows is the same as what\(cqs found there:
4462 \fBgit-show\fR(1), and
4463 \fBgit-whatchanged\fR(1)
4465 \fB\-\-abbrev\-commit\fR\&. You may override this option with
4466 \fB\-\-no\-abbrev\-commit\fR\&.
4471 Set the default date\-time mode for the
4473 command\&. Setting a value for log\&.date is similar to using
4480 If the format is set to "auto:foo" and the pager is in use, format "foo" will be the used for the date format\&. Otherwise "default" will be used\&.
4485 Print out the ref names of any commits that are shown by the log command\&. If
4487 is specified, the ref name prefixes
4492 will not be printed\&. If
4494 is specified, the full ref name (including prefix) will be printed\&. If
4496 is specified, then if the output is going to a terminal, the ref names are shown as if
4498 were given, otherwise no ref names are shown\&. This is the same as the
4504 log\&.initialDecorationSet
4508 only shows decorations for certain known ref namespaces\&. If
4510 is specified, then show all refs as decorations\&.
4513 log\&.excludeDecoration
4515 Exclude the specified patterns from the log decorations\&. This is similar to the
4516 \fB\-\-decorate\-refs\-exclude\fR
4517 command\-line option, but the config option can be overridden by the
4518 \fB\-\-decorate\-refs\fR
4524 Set diff format to be used when
4525 \fB\-\-diff\-merges=on\fR
4527 \fB\-\-diff\-merges\fR
4530 for details\&. Defaults to
4541 option was used when a single <path> is given\&. This has the same limitations as
4542 \fB\-\-follow\fR, i\&.e\&. it cannot be used to follow multiple files and does not work well on non\-linear history\&.
4547 A list of colors, separated by commas, that can be used to draw history lines in
4548 \fBgit log \-\-graph\fR\&.
4553 If true, the initial commit will be shown as a big creation event\&. This is equivalent to a diff against an empty tree\&. Tools like
4556 \fBgit-whatchanged\fR(1), which normally hide the root commit will now show it\&. True by default\&.
4563 \fBgit-show\fR(1), and
4564 \fBgit-whatchanged\fR(1)
4566 \fB\-\-show\-signature\fR\&.
4573 \fBgit-show\fR(1), and
4574 \fBgit-whatchanged\fR(1)
4576 \fB\-\-use\-mailmap\fR, otherwise assume
4577 \fB\-\-no\-use\-mailmap\fR\&. True by default\&.
4580 notes\&.mergeStrategy
4582 Which merge strategy to choose by default when resolving notes conflicts\&. Must be one of
4587 \fBcat_sort_uniq\fR\&. Defaults to
4588 \fBmanual\fR\&. See "NOTES MERGE STRATEGIES" section of
4590 for more information on each strategy\&.
4592 This setting can be overridden by passing the
4595 \fBgit-notes\fR(1)\&.
4598 notes\&.<name>\&.mergeStrategy
4600 Which merge strategy to choose when doing a notes merge into refs/notes/<name>\&. This overrides the more general "notes\&.mergeStrategy"\&. See the "NOTES MERGE STRATEGIES" section in
4602 for more information on the available strategies\&.
4607 Which ref (or refs, if a glob or specified more than once), in addition to the default set by
4608 \fBcore\&.notesRef\fR
4610 \fBGIT_NOTES_REF\fR, to read notes from when showing commit messages with the
4612 family of commands\&.
4614 This setting can be overridden with the
4615 \fBGIT_NOTES_DISPLAY_REF\fR
4616 environment variable, which must be a colon separated list of refs or globs\&.
4618 A warning will be issued for refs that do not exist, but a glob that does not match any refs is silently ignored\&.
4620 This setting can be disabled by the
4624 family of commands, or by the
4625 \fB\-\-notes=<ref>\fR
4626 option accepted by those commands\&.
4628 The effective value of "core\&.notesRef" (possibly overridden by GIT_NOTES_REF) is also implicitly added to the list of refs to be displayed\&.
4631 notes\&.rewrite\&.<command>
4633 When rewriting commits with <command> (currently
4636 \fBrebase\fR), if this variable is
4637 \fBfalse\fR, git will not copy notes from the original to the rewritten commit\&. Defaults to
4638 \fBtrue\fR\&. See also "\fBnotes\&.rewriteRef\fR" below\&.
4640 This setting can be overridden with the
4641 \fBGIT_NOTES_REWRITE_REF\fR
4642 environment variable, which must be a colon separated list of refs or globs\&.
4647 When copying notes during a rewrite (see the "notes\&.rewrite\&.<command>" option), determines what to do if the target commit already has a note\&. Must be one of
4650 \fBcat_sort_uniq\fR, or
4651 \fBignore\fR\&. Defaults to
4652 \fBconcatenate\fR\&.
4654 This setting can be overridden with the
4655 \fBGIT_NOTES_REWRITE_MODE\fR
4656 environment variable\&.
4661 When copying notes during a rewrite, specifies the (fully qualified) ref whose notes should be copied\&. May be a glob, in which case notes in all matching refs will be copied\&. You may also specify this configuration several times\&.
4663 Does not have a default value; you must configure this variable to enable note rewriting\&. Set it to
4664 \fBrefs/notes/commits\fR
4665 to enable rewriting for the default commit notes\&.
4667 Can be overridden with the
4668 \fBGIT_NOTES_REWRITE_REF\fR
4669 environment variable\&. See
4670 \fBnotes\&.rewrite\&.<command>\fR
4671 above for a further description of its format\&.
4675 Part of the \fBgit\fR(1) suite