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.38.0.rc1.6.g4fd6c5e444
10 .TH "GIT\-LOG" "1" "09/23/2022" "Git 2\&.38\&.0\&.rc1\&.6\&.g4f" "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\&.
577 Pretend as if all objects mentioned by reflogs are listed on the command line as
583 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
584 \fBobjects/info/alternates\fR\&. The set of included objects may be modified by
585 \fBcore\&.alternateRefsCommand\fR, etc\&. See
586 \fBgit-config\fR(1)\&.
591 By default, all working trees will be examined by the following options when there are more than one (see
592 \fBgit-worktree\fR(1)):
596 \fB\-\-indexed\-objects\fR\&. This option forces them to examine the current working tree only\&.
601 Upon seeing an invalid object name in the input, pretend as if the bad input was not given\&.
606 Pretend as if the bad bisection ref
607 \fBrefs/bisect/bad\fR
608 was listed and as if it was followed by
610 and the good bisection refs
611 \fBrefs/bisect/good\-*\fR
612 on the command line\&.
619 listed on the command line, read them from the standard input\&. If a
621 separator is seen, stop reading commits and start reading paths to limit the result\&.
627 \fB\-\-cherry\-pick\fR
628 (see below) but mark equivalent commits with
630 rather than omitting them, and inequivalent ones with
636 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\&.
638 For example, if you have two branches,
641 \fBB\fR, a usual way to list all commits on only one side of them is with
642 \fB\-\-left\-right\fR
643 (see the example below in the description of the
644 \fB\-\-left\-right\fR
645 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\&.
648 \-\-left\-only, \-\-right\-only
650 List only commits on the respective side of a symmetric difference, i\&.e\&. only those which would be marked
655 \fB\-\-left\-right\fR\&.
658 \fB\-\-cherry\-pick \-\-right\-only A\&.\&.\&.B\fR
659 omits those commits from
663 or are patch\-equivalent to a commit in
664 \fBA\fR\&. In other words, this lists the
667 \fBgit cherry A B\fR\&. More precisely,
668 \fB\-\-cherry\-pick \-\-right\-only \-\-no\-merges\fR
669 gives the exact list\&.
675 \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
676 \fBgit log \-\-cherry upstream\&.\&.\&.mybranch\fR, similar to
677 \fBgit cherry upstream mybranch\fR\&.
680 \-g, \-\-walk\-reflogs
682 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,
684 \fIcommit1\&.\&.commit2\fR, and
685 \fIcommit1\&.\&.\&.commit2\fR
686 notations cannot be used)\&.
694 (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
698 is the reverse\-chronological index in the reflog) or as
699 \fBref@{timestamp}\fR
700 (with the timestamp for that entry), depending on a few rules:
710 If the starting point is specified as
711 \fBref@{Nth}\fR, show the index format\&.
722 If the starting point was specified as
723 \fBref@{now}\fR, show the timestamp format\&.
734 If neither was used, but
736 was given on the command line, show the timestamp in the format requested by
748 Otherwise, show the index format\&.
752 \fB\-\-pretty=oneline\fR, the commit message is prefixed with this information on the same line\&. This option cannot be combined with
753 \fB\-\-reverse\fR\&. See also
754 \fBgit-reflog\fR(1)\&.
757 \fB\-\-pretty=reference\fR, this information will not be shown at all\&.
762 After a failed merge, show refs that touch files having a conflict and don\(cqt exist on all heads to merge\&.
767 Output excluded boundary commits\&. Boundary commits are prefixed with
770 .SS "History Simplification"
772 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\&.
774 The following options select the commits to be shown:
778 Commits modifying the given <paths> are selected\&.
781 \-\-simplify\-by\-decoration
783 Commits that are referred by some branch or tag are selected\&.
786 Note that extra commits can be shown to give a meaningful history\&.
788 The following options affect the way the simplification is performed:
792 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)
797 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\&.
802 Same as the default mode, but does not prune some history\&.
807 Only the selected commits are shown, plus some to have a meaningful history\&.
812 All commits in the simplified history are shown\&.
818 \fB\-\-full\-history\fR
819 to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge\&.
822 \-\-ancestry\-path[=<commit>]
824 When given a range of commits to display (e\&.g\&.
825 \fIcommit1\&.\&.commit2\fR
827 \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
829 (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\&.
832 A more detailed explanation follows\&.
834 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\&.)
836 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:
842 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
846 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq X
853 The horizontal line of history A\-\-\-Q is taken to be the first parent of each merge\&. The commits are:
864 is the initial commit, in which
866 exists with contents \(lqasdf\(rq, and a file
868 exists with contents \(lqquux\(rq\&. Initial commits are compared to an empty tree, so
884 contains just \(lqfoo\(rq\&.
896 contains the same change as
899 is trivial and hence TREESAME to all parents\&.
912 \fBfoo\fR, but its merge
914 changes it to \(lqfoobar\(rq, so it is not TREESAME to any parent\&.
928 to \(lqbaz\(rq\&. Its merge
930 combines the strings from
934 to \(lqfoobarbaz\(rq; i\&.e\&., it is not TREESAME to any parent\&.
948 to \(lqxyzzy\(rq, and its merge
950 combines the strings to \(lqquux xyzzy\(rq\&.
966 is an independent root commit that added a new file
984 \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\&.
988 Commits are included if they are not TREESAME to any parent (though this can be changed, see
990 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\&.
1000 I\-\-\-\-\-\-\-\-\-D
1006 Note how the rule to only follow the TREESAME parent, if one is available, removed
1008 from consideration entirely\&.
1011 \fBN\fR, but is TREESAME\&. Root commits are compared to an empty tree, so
1015 Parent/child relations are only visible with
1016 \fB\-\-parents\fR, but that does not affect the commits selected in default mode, so we have shown the parent lines\&.
1019 \-\-full\-history without parent rewriting
1021 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
1034 was excluded because it is TREESAME to both parents\&.
1039 were all walked, but only
1041 was !TREESAME, so the others do not appear\&.
1043 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\&.
1046 \-\-full\-history with parent rewriting
1048 Ordinary commits are only included if they are !TREESAME (though this can be changed, see
1052 Merges are always included\&. However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves\&. This results in
1058 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
1062 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq
1069 \fB\-\-full\-history\fR
1070 without rewriting above\&. Note that
1072 was pruned away because it is TREESAME, but the parent list of P was rewritten to contain
1074 \fBI\fR\&. The same happened for
1084 In addition to the above settings, you can change whether TREESAME affects inclusion:
1088 Commits that are walked are included if they are not TREESAME to any parent\&.
1093 All commits that are walked are included\&.
1096 \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\&.
1099 \-\-simplify\-merges
1101 First, build a history graph in the same way that
1102 \fB\-\-full\-history\fR
1103 with parent rewriting does (see above)\&.
1105 Then simplify each commit
1109 in the final history according to the following rules:
1113 \h'-04'\(bu\h'+03'\c
1127 \h'-04'\(bu\h'+03'\c
1137 with its simplification
1138 \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\&.
1143 \h'-04'\(bu\h'+03'\c
1149 If after this parent rewriting,
1151 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\&.
1154 The effect of this is best shown by way of comparing to
1155 \fB\-\-full\-history\fR
1156 with parent rewriting\&. The example turns into:
1162 \&.\-A\-\-\-M\-\-\-N\-\-\-O
1166 `\-\-\-\-\-\-\-\-\-\(aq
1172 Note the major differences in
1177 \fB\-\-full\-history\fR:
1181 \h'-04'\(bu\h'+03'\c
1187 \fBN\fR\(aqs parent list had
1189 removed, because it is an ancestor of the other parent
1192 remained because it is !TREESAME\&.
1197 \h'-04'\(bu\h'+03'\c
1203 \fBP\fR\(aqs parent list similarly had
1207 was then removed completely, because it had one parent and is TREESAME\&.
1212 \h'-04'\(bu\h'+03'\c
1218 \fBQ\fR\(aqs parent list had
1223 was then removed, because it was a TREESAME root\&.
1225 was then removed completely, because it had one parent and is TREESAME\&.
1229 There is another simplification mode available:
1231 \-\-ancestry\-path[=<commit>]
1233 Limit the displayed commits to those which are an ancestor of <commit>, or which are a descendant of <commit>, or are <commit> itself\&.
1235 As an example use case, consider the following commit history:
1241 D\-\-\-E\-\-\-\-\-\-\-F
1243 B\-\-\-C\-\-\-G\-\-\-H\-\-\-I\-\-\-J
1245 A\-\-\-\-\-\-\-K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1253 computes the set of commits that are ancestors of
1254 \fBM\fR, but excludes the ones that are ancestors of
1255 \fBD\fR\&. This is useful to see what happened to the history leading to
1258 \fBD\fR, in the sense that \(lqwhat does
1260 have that did not exist in
1261 \fBD\fR\(rq\&. The result in this example would be all the commits, except
1267 itself, of course)\&.
1269 When we want to find out what commits in
1271 are contaminated with the bug introduced by
1273 and need fixing, however, we might want to view only the subset of
1275 that are actually descendants of
1276 \fBD\fR, i\&.e\&. excluding
1279 \fBK\fR\&. This is exactly what the
1280 \fB\-\-ancestry\-path\fR
1281 option does\&. Applied to the
1283 range, it results in:
1291 G\-\-\-H\-\-\-I\-\-\-J
1300 \fB\-\-ancestry\-path=D\fR
1302 \fB\-\-ancestry\-path\fR
1303 which means the same thing when applied to the
1305 range but is just more explicit\&.
1307 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
1309 which contain that topic in their ancestry path\&. So, using
1310 \fB\-\-ancestry\-path=H D\&.\&.M\fR
1311 for example would result in:
1319 G\-\-\-H\-\-\-I\-\-\-J
1328 \fB\-\-ancestry\-path=K D\&.\&.M\fR
1335 K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1343 Before discussing another option, \fB\-\-show\-pulls\fR, we need to create a new example history\&.
1345 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:
1351 \&.\-A\-\-\-M\-\-\-\-\-C\-\-N\-\-\-O\-\-\-P
1353 I B \e R\-\(aq`\-Z\(aq /
1356 `\-\-\-X\-\-\(aq `\-\-\-Y\-\-\(aq
1363 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\&.
1365 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:
1378 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:
1384 \&.\-A\-\-\-M\-\-\-\-\-\-\-\-N\-\-\-O\-\-\-P
1386 I B \e R\-\(aq`\-\-\(aq /
1389 `\-\-\-X\-\-\(aq `\-\-\-\-\-\-\(aq
1396 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\&.
1398 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:
1404 \&.\-A\-\-\-M\-\-\&.
1416 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\&.
1418 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\&.
1420 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\&.
1424 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\&.
1426 When a merge commit is included by
1427 \fB\-\-show\-pulls\fR, the merge is treated as if it "pulled" the change from another branch\&. When using
1428 \fB\-\-show\-pulls\fR
1429 on this example (and no other options) the resulting graph is:
1435 I\-\-\-X\-\-\-R\-\-\-N
1441 Here, the merge commits
1445 are included because they pulled the commits
1449 into the base branch, respectively\&. These merges are the reason the commits
1453 do not appear in the default history\&.
1456 \fB\-\-show\-pulls\fR
1458 \fB\-\-simplify\-merges\fR, the graph includes all of the necessary information:
1464 \&.\-A\-\-\-M\-\-\&. N
1478 \fBR\fR, the edge from
1482 was simplified away\&. However,
1484 still appears in the history as an important commit because it "pulled" the change
1486 into the main branch\&.
1489 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)\&.
1490 .SS "Commit Ordering"
1492 By default, the commits are shown in reverse chronological order\&.
1496 Show no parents before all of its children are shown, but otherwise show commits in the commit timestamp order\&.
1499 \-\-author\-date\-order
1501 Show no parents before all of its children are shown, but otherwise show commits in the author timestamp order\&.
1506 Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed\&.
1508 For example, in a commit history like this:
1514 \-\-\-1\-\-\-\-2\-\-\-\-4\-\-\-\-7
1516 3\-\-\-\-5\-\-\-\-6\-\-\-\-8\-\-\-
1522 where the numbers denote the order of commit timestamps,
1525 \fB\-\-date\-order\fR
1526 show the commits in the timestamp order: 8 7 6 5 4 3 2 1\&.
1529 \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\&.
1534 Output the commits chosen to be shown (see Commit Limiting section above) in reverse order\&. Cannot be combined with
1535 \fB\-\-walk\-reflogs\fR\&.
1537 .SS "Object Traversal"
1539 These options are mostly targeted for packing of Git repositories\&.
1541 \-\-no\-walk[=(sorted|unsorted)]
1543 Only show the given commits, but do not traverse their ancestors\&. This has no effect if a range is specified\&. If the argument
1545 is given, the commits are shown in the order they were given on the command line\&. Otherwise (if
1547 or no argument was given), the commits are shown in reverse chronological order by commit time\&. Cannot be combined with
1553 Overrides a previous
1554 \fB\-\-no\-walk\fR\&.
1556 .SS "Commit Formatting"
1558 \-\-pretty[=<format>], \-\-format=<format>
1560 Pretty\-print the contents of the commit logs in a given format, where
1571 \fIformat:<string>\fR
1573 \fItformat:<string>\fR\&. When
1575 is none of the above, and has
1577 in it, it acts as if
1578 \fI\-\-pretty=tformat:<format>\fR
1581 See the "PRETTY FORMATS" section for some additional details for each format\&. When
1583 part is omitted, it defaults to
1586 Note: you can specify the default pretty format in the repository configuration (see
1587 \fBgit-config\fR(1))\&.
1592 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\&.
1594 This should make "\-\-pretty=oneline" a whole lot more readable for people using 80\-column terminals\&.
1597 \-\-no\-abbrev\-commit
1599 Show the full 40\-byte hexadecimal commit object name\&. This negates
1600 \fB\-\-abbrev\-commit\fR, either explicit or implied by other options such as "\-\-oneline"\&. It also overrides the
1601 \fBlog\&.abbrevCommit\fR
1607 This is a shorthand for "\-\-pretty=oneline \-\-abbrev\-commit" used together\&.
1610 \-\-encoding=<encoding>
1612 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
1614 and we are outputting in
1615 \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\&.
1618 \-\-expand\-tabs=<n>, \-\-expand\-tabs, \-\-no\-expand\-tabs
1620 Perform a tab expansion (replace each tab with enough spaces to fill to the next display column that is multiple of
1621 \fI<n>\fR) in the log message before showing it in the output\&.
1622 \fB\-\-expand\-tabs\fR
1623 is a short\-hand for
1624 \fB\-\-expand\-tabs=8\fR, and
1625 \fB\-\-no\-expand\-tabs\fR
1626 is a short\-hand for
1627 \fB\-\-expand\-tabs=0\fR, which disables tab expansion\&.
1629 By default, tabs are expanded in pretty formats that indent the log message by 4 spaces (i\&.e\&.
1630 \fImedium\fR, which is the default,
1638 \fBgit-notes\fR(1)) that annotate the commit, when showing the commit log message\&. This is the default for
1642 \fBgit whatchanged\fR
1643 commands when there is no
1645 \fB\-\-format\fR, or
1647 option given on the command line\&.
1649 By default, the notes shown are from the notes refs listed in the
1650 \fBcore\&.notesRef\fR
1652 \fBnotes\&.displayRef\fR
1653 variables (or corresponding environment overrides)\&. See
1659 argument, use the ref to find the notes to display\&. The ref can specify the full refname when it begins with
1660 \fBrefs/notes/\fR; when it begins with
1665 is prefixed to form a full name of the ref\&.
1667 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)\&.
1672 Do not show notes\&. This negates the above
1674 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"\&.
1677 \-\-show\-notes[=<ref>], \-\-[no\-]standard\-notes
1679 These options are deprecated\&. Use the above \-\-notes/\-\-no\-notes options instead\&.
1684 Check the validity of a signed commit object by passing the signature to
1685 \fBgpg \-\-verify\fR
1686 and show the output\&.
1692 \fB\-\-date=relative\fR\&.
1697 Only takes effect for dates shown in human\-readable format, such as when using
1700 config variable sets a default value for the log command\(cqs
1702 option\&. By default, dates are shown in the original time zone (either committer\(cqs or author\(cqs)\&. If
1704 is appended to the format (e\&.g\&.,
1705 \fBiso\-local\fR), the user\(cqs local time zone is used instead\&.
1707 \fB\-\-date=relative\fR
1708 shows dates relative to the current time, e\&.g\&. \(lq2 hours ago\(rq\&. The
1710 option has no effect for
1711 \fB\-\-date=relative\fR\&.
1713 \fB\-\-date=local\fR
1715 \fB\-\-date=default\-local\fR\&.
1719 \fB\-\-date=iso8601\fR) shows timestamps in a ISO 8601\-like format\&. The differences to the strict ISO 8601 format are:
1723 \h'-04'\(bu\h'+03'\c
1729 a space instead of the
1736 \h'-04'\(bu\h'+03'\c
1742 a space between time and time zone
1747 \h'-04'\(bu\h'+03'\c
1753 no colon between hours and minutes of the time zone
1756 \fB\-\-date=iso\-strict\fR
1758 \fB\-\-date=iso8601\-strict\fR) shows timestamps in strict ISO 8601 format\&.
1762 \fB\-\-date=rfc2822\fR) shows timestamps in RFC 2822 format, often found in email messages\&.
1764 \fB\-\-date=short\fR
1765 shows only the date, but not the time, in
1770 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
1774 with four digits; the first two are hours, and the second two are minutes)\&. I\&.e\&., as if the timestamp were formatted with
1775 \fBstrftime("%s %z")\fR)\&. Note that the
1777 option does not affect the seconds\-since\-epoch value (which is always measured in UTC), but does switch the accompanying timezone value\&.
1779 \fB\-\-date=human\fR
1780 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\&.
1783 shows the date as a Unix epoch timestamp (seconds since 1970)\&. As with
1784 \fB\-\-raw\fR, this is always in UTC and therefore
1788 \fB\-\-date=format:\&.\&.\&.\fR
1792 \fBstrftime\fR, except for %s, %z, and %Z, which are handled internally\&. Use
1793 \fB\-\-date=format:%c\fR
1794 to show the date in your system locale\(cqs preferred format\&. See the
1796 manual for a complete list of format placeholders\&. When using
1797 \fB\-local\fR, the correct syntax is
1798 \fB\-\-date=format\-local:\&.\&.\&.\fR\&.
1800 \fB\-\-date=default\fR
1801 is the default format, and is similar to
1802 \fB\-\-date=rfc2822\fR, with a few exceptions:
1806 \h'-04'\(bu\h'+03'\c
1812 there is no comma after the day\-of\-week
1817 \h'-04'\(bu\h'+03'\c
1823 the time zone is omitted when the local time zone is used
1829 Print also the parents of the commit (in the form "commit parent\&...")\&. Also enables parent rewriting, see
1830 \fIHistory Simplification\fR
1836 Print also the children of the commit (in the form "commit child\&...")\&. Also enables parent rewriting, see
1837 \fIHistory Simplification\fR
1843 Mark which side of a symmetric difference a commit is reachable from\&. Commits from the left side are prefixed with
1845 and those from the right with
1846 \fB>\fR\&. If combined with
1847 \fB\-\-boundary\fR, those commits are prefixed with
1850 For example, if you have this topology:
1856 y\-\-\-b\-\-\-b branch B
1860 o\-\-\-x\-\-\-a\-\-\-a branch A
1866 you would get an output like this:
1872 $ git rev\-list \-\-left\-right \-\-boundary \-\-pretty=oneline A\&.\&.\&.B
1874 >bbbbbbb\&.\&.\&. 3rd on b
1875 >bbbbbbb\&.\&.\&. 2nd on b
1876 <aaaaaaa\&.\&.\&. 3rd on a
1877 <aaaaaaa\&.\&.\&. 2nd on a
1878 \-yyyyyyy\&.\&.\&. 1st on b
1879 \-xxxxxxx\&.\&.\&. 1st on a
1889 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
1890 \fB\-\-no\-walk\fR\&.
1892 This enables parent rewriting, see
1893 \fIHistory Simplification\fR
1897 \fB\-\-topo\-order\fR
1898 option by default, but the
1899 \fB\-\-date\-order\fR
1900 option may also be specified\&.
1903 \-\-show\-linear\-break[=<barrier>]
1905 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
1907 is specified, it is the string that will be shown instead of the default one\&.
1909 .SH "PRETTY FORMATS"
1911 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\&.
1913 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:
1917 \h'-04'\(bu\h'+03'\c
1929 <hash> <title\-line>
1935 This is designed to be as compact as possible\&.
1940 \h'-04'\(bu\h'+03'\c
1972 \h'-04'\(bu\h'+03'\c
1986 Date: <author\-date>
2006 <full\-commit\-message>
2015 \h'-04'\(bu\h'+03'\c
2049 <full\-commit\-message>
2058 \h'-04'\(bu\h'+03'\c
2072 AuthorDate: <author\-date>
2074 CommitDate: <committer\-date>
2094 <full\-commit\-message>
2103 \h'-04'\(bu\h'+03'\c
2115 <abbrev\-hash> (<title\-line>, <short\-author\-date>)
2121 This format is used to refer to another commit in a commit message and is the same as
2122 \fB\-\-pretty=\(aqformat:%C(auto)%h (%s, %ad)\(aq\fR\&. By default, the date is formatted with
2123 \fB\-\-date=short\fR
2126 option is explicitly specified\&. As with any
2128 with format placeholders, its output is not affected by other options like
2131 \fB\-\-walk\-reflogs\fR\&.
2136 \h'-04'\(bu\h'+03'\c
2150 Date: <author\-date>
2151 Subject: [PATCH] <title\-line>
2161 <full\-commit\-message>
2170 \h'-04'\(bu\h'+03'\c
2179 \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\&.
2184 \h'-04'\(bu\h'+03'\c
2194 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
2196 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
2197 \fBgit log \-\-raw\fR\&. To get full object names in a raw diff format, use
2198 \fB\-\-no\-abbrev\fR\&.
2203 \h'-04'\(bu\h'+03'\c
2209 \fIformat:<format\-string>\fR
2212 \fIformat:<format\-string>\fR
2213 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
2219 \fIformat:"The author of %h was %an, %ar%nThe title was >>%s<<%n"\fR
2220 would show something like this:
2226 The author of fe6e0ee was Junio C Hamano, 23 hours ago
2227 The title was >>t4119: test autocomputing \-p<n> for traditional diff input\&.<<
2233 The placeholders are:
2237 \h'-04'\(bu\h'+03'\c
2243 Placeholders that expand to a single literal character:
2258 print a byte from a hex code
2264 \h'-04'\(bu\h'+03'\c
2270 Placeholders that affect formatting of later placeholders:
2279 switch color to green
2284 switch color to blue
2294 color specification, as described under Values in the "CONFIGURATION FILE" section of
2295 \fBgit-config\fR(1)\&. By default, colors are shown only when enabled for log output (by
2297 \fBcolor\&.ui\fR, or
2298 \fB\-\-color\fR, and respecting the
2300 settings of the former if we are going to a terminal)\&.
2301 \fB%C(auto,\&.\&.\&.)\fR
2302 is accepted as a historical synonym for the default (e\&.g\&.,
2303 \fB%C(auto,red)\fR)\&. Specifying
2304 \fB%C(always,\&.\&.\&.)\fR
2305 will show the colors even when color is not otherwise enabled (though consider just using
2306 \fB\-\-color=always\fR
2307 to enable color for the whole output, including this format and anything else git might color)\&.
2310 \fB%C(auto)\fR) will turn on auto coloring on the next placeholders until the color is switched again\&.
2315 left (\fB<\fR), right (\fB>\fR) or boundary (\fB\-\fR) mark
2318 \fI%w([<w>[,<i1>[,<i2>]]])\fR
2320 switch line wrapping, like the \-w option of
2321 \fBgit-shortlog\fR(1)\&.
2324 \fI%<(<N>[,trunc|ltrunc|mtrunc])\fR
2326 make the next placeholder take at least N columns, padding spaces on the right if necessary\&. Optionally truncate at the beginning (ltrunc), the middle (mtrunc) or the end (trunc) if the output is longer than N columns\&. Note that truncating only works correctly with N >= 2\&.
2331 make the next placeholder take at least until Nth columns, padding spaces on the right if necessary
2334 \fI%>(<N>)\fR, \fI%>|(<N>)\fR
2339 respectively, but padding spaces on the left
2342 \fI%>>(<N>)\fR, \fI%>>|(<N>)\fR
2347 respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces
2350 \fI%><(<N>)\fR, \fI%><|(<N>)\fR
2355 respectively, but padding both sides (i\&.e\&. the text is centered)
2361 \h'-04'\(bu\h'+03'\c
2367 Placeholders that expand to information extracted from the commit:
2376 abbreviated commit hash
2386 abbreviated tree hash
2396 abbreviated parent hashes
2406 author name (respecting \&.mailmap, see
2407 \fBgit-shortlog\fR(1)
2419 author email (respecting \&.mailmap, see
2420 \fBgit-shortlog\fR(1)
2427 author email local\-part (the part before the
2434 author local\-part (see
2435 \fI%al\fR) respecting \&.mailmap, see
2436 \fBgit-shortlog\fR(1)
2443 author date (format respects \-\-date= option)
2448 author date, RFC2822 style
2453 author date, relative
2458 author date, UNIX timestamp
2463 author date, ISO 8601\-like format
2468 author date, strict ISO 8601 format
2473 author date, short format (\fBYYYY\-MM\-DD\fR)
2478 author date, human style (like the
2479 \fB\-\-date=human\fR
2481 \fBgit-rev-list\fR(1))
2491 committer name (respecting \&.mailmap, see
2492 \fBgit-shortlog\fR(1)
2504 committer email (respecting \&.mailmap, see
2505 \fBgit-shortlog\fR(1)
2512 committer email local\-part (the part before the
2519 committer local\-part (see
2520 \fI%cl\fR) respecting \&.mailmap, see
2521 \fBgit-shortlog\fR(1)
2528 committer date (format respects \-\-date= option)
2533 committer date, RFC2822 style
2538 committer date, relative
2543 committer date, UNIX timestamp
2548 committer date, ISO 8601\-like format
2553 committer date, strict ISO 8601 format
2558 committer date, short format (\fBYYYY\-MM\-DD\fR)
2563 committer date, human style (like the
2564 \fB\-\-date=human\fR
2566 \fBgit-rev-list\fR(1))
2571 ref names, like the \-\-decorate option of
2577 ref names without the " (", ")" wrapping\&.
2580 \fI%(describe[:options])\fR
2582 human\-readable name, like
2583 \fBgit-describe\fR(1); empty string for undescribable commits\&. The
2585 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\&.
2589 \h'-04'\(bu\h'+03'\c
2595 \fItags[=<bool\-value>]\fR: Instead of only considering annotated tags, consider lightweight tags as well\&.
2600 \h'-04'\(bu\h'+03'\c
2606 \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\&.
2611 \h'-04'\(bu\h'+03'\c
2617 \fImatch=<pattern>\fR: Only consider tags matching the given
2619 pattern, excluding the "refs/tags/" prefix\&.
2624 \h'-04'\(bu\h'+03'\c
2630 \fIexclude=<pattern>\fR: Do not consider tags matching the given
2632 pattern, excluding the "refs/tags/" prefix\&.
2638 ref name given on the command line by which the commit was reached (like
2639 \fBgit log \-\-source\fR), only works with
2655 sanitized subject line, suitable for a filename
2665 raw body (unwrapped subject and body)
2675 raw verification message from GPG for a signed commit
2680 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
2685 show the name of the signer for a signed commit
2690 show the key used to sign a signed commit
2695 show the fingerprint of the key used to sign a signed commit
2700 show the fingerprint of the primary key whose subkey was used to sign a signed commit
2705 show the trust level for the key used to sign a signed commit
2710 reflog selector, e\&.g\&.,
2711 \fBrefs/stash@{1}\fR
2713 \fBrefs/stash@{2 minutes ago}\fR; the format follows the rules described for the
2715 option\&. The portion before the
2717 is the refname as given on the command line (so
2718 \fBgit log \-g refs/heads/master\fR
2720 \fBrefs/heads/master@{0}\fR)\&.
2725 shortened reflog selector; same as
2726 \fB%gD\fR, but the refname portion is shortened for human readability (so
2727 \fBrefs/heads/master\fR
2734 reflog identity name
2739 reflog identity name (respecting \&.mailmap, see
2740 \fBgit-shortlog\fR(1)
2747 reflog identity email
2752 reflog identity email (respecting \&.mailmap, see
2753 \fBgit-shortlog\fR(1)
2763 \fI%(trailers[:options])\fR
2765 display the trailers of the body as interpreted by
2766 \fBgit-interpret-trailers\fR(1)\&. The
2768 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\&.
2772 \h'-04'\(bu\h'+03'\c
2778 \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
2780 option so that non\-trailer lines in the trailer block are hidden\&. If that is not desired it can be disabled with
2781 \fBonly=false\fR\&. E\&.g\&.,
2782 \fB%(trailers:key=Reviewed\-by)\fR
2783 shows trailer lines with key
2784 \fBReviewed\-by\fR\&.
2789 \h'-04'\(bu\h'+03'\c
2795 \fIonly[=<bool>]\fR: select whether non\-trailer lines from the trailer block should be included\&.
2800 \h'-04'\(bu\h'+03'\c
2806 \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
2808 as it would otherwise be parsed as next option\&. E\&.g\&.,
2809 \fB%(trailers:key=Ticket,separator=%x2C )\fR
2810 shows all trailer lines whose key is "Ticket" separated by a comma and a space\&.
2815 \h'-04'\(bu\h'+03'\c
2821 \fIunfold[=<bool>]\fR: make it behave as if interpret\-trailer\(cqs
2823 option was given\&. E\&.g\&.,
2824 \fB%(trailers:only,unfold=true)\fR
2825 unfolds and shows all trailer lines\&.
2830 \h'-04'\(bu\h'+03'\c
2836 \fIkeyonly[=<bool>]\fR: only show the key part of the trailer\&.
2841 \h'-04'\(bu\h'+03'\c
2847 \fIvalueonly[=<bool>]\fR: only show the value part of the trailer\&.
2852 \h'-04'\(bu\h'+03'\c
2858 \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
2859 \fIseparator=<sep>\fR
2870 .nr an-no-space-flag 1
2878 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\&.
2882 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\&.
2884 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\&.
2886 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\&.
2888 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\&.
2892 \h'-04'\(bu\h'+03'\c
2902 format works exactly like
2903 \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:
2909 $ git log \-2 \-\-pretty=format:%h 4da45bef \e
2910 | perl \-pe \(aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\(aq
2912 7134973 \-\- NO NEWLINE
2914 $ git log \-2 \-\-pretty=tformat:%h 4da45bef \e
2915 | perl \-pe \(aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\(aq
2923 In addition, any unrecognized string that has a
2925 in it is interpreted as if it has
2927 in front of it\&. For example, these two are equivalent:
2933 $ git log \-2 \-\-pretty=tformat:%h 4da45bef
2934 $ git log \-2 \-\-pretty=%h 4da45bef
2941 .SH "DIFF FORMATTING"
2943 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\&.
2945 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\&.
2949 Generate patch (see section on generating patches)\&.
2954 Suppress diff output\&. Useful for commands like
2956 that show the patch by default, or to cancel the effect of
2960 \-\-diff\-merges=(off|none|on|first\-parent|1|separate|m|combined|c|dense\-combined|cc|remerge|r), \-\-no\-diff\-merges
2962 Specify diff format to be used for merge commits\&. Default is
2965 \fB\-\-first\-parent\fR
2966 is in use, in which case
2970 \-\-diff\-merges=(off|none), \-\-no\-diff\-merges
2972 Disable output of diffs for merge commits\&. Useful to override implied value\&.
2975 \-\-diff\-merges=on, \-\-diff\-merges=m, \-m
2977 This option makes diff output for merge commits to be shown in the default format\&.
2979 will produce the output only if
2981 is given as well\&. The default format could be changed using
2982 \fBlog\&.diffMerges\fR
2983 configuration parameter, which default value is
2987 \-\-diff\-merges=first\-parent, \-\-diff\-merges=1
2989 This option makes merge commits show the full diff with respect to the first parent only\&.
2992 \-\-diff\-merges=separate
2994 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\&.
2997 \-\-diff\-merges=remerge, \-\-diff\-merges=r, \-\-remerge\-diff
2999 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\&.
3001 The output emitted when this option is used is subject to change, and so is its interaction with other options (unless explicitly documented)\&.
3004 \-\-diff\-merges=combined, \-\-diff\-merges=c, \-c
3006 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\&.
3012 \-\-diff\-merges=dense\-combined, \-\-diff\-merges=cc, \-\-cc
3014 With this option the output produced by
3015 \fB\-\-diff\-merges=combined\fR
3016 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\&.
3023 \-\-combined\-all\-paths
3025 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
3026 \fB\-\-diff\-merges=[dense\-]combined\fR
3027 is in use, and is likely only useful if filename changes are detected (i\&.e\&. when either rename or copy detection have been requested)\&.
3030 \-U<n>, \-\-unified=<n>
3032 Generate diffs with <n> lines of context instead of the usual three\&. Implies
3038 Output to a specific file instead of stdout\&.
3041 \-\-output\-indicator\-new=<char>, \-\-output\-indicator\-old=<char>, \-\-output\-indicator\-context=<char>
3043 Specify the character used to indicate new, old or context lines in the generated patch\&. Normally they are
3046 and \(aq \(aq respectively\&.
3051 For each commit, show a summary of changes using the raw diff format\&. See the "RAW OUTPUT FORMAT" section of
3052 \fBgit-diff\fR(1)\&. This is different from showing the log itself in raw format, which you can achieve with
3053 \fB\-\-format=raw\fR\&.
3056 \-\-patch\-with\-raw
3059 \fB\-p \-\-raw\fR\&.
3064 Show the tree objects in the diff output\&.
3067 \-\-indent\-heuristic
3069 Enable the heuristic that shifts diff hunk boundaries to make patches easier to read\&. This is the default\&.
3072 \-\-no\-indent\-heuristic
3074 Disable the indent heuristic\&.
3079 Spend extra time to make sure the smallest possible diff is produced\&.
3084 Generate a diff using the "patience diff" algorithm\&.
3089 Generate a diff using the "histogram diff" algorithm\&.
3094 Generate a diff using the "anchored diff" algorithm\&.
3096 This option may be specified more than once\&.
3098 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\&.
3101 \-\-diff\-algorithm={patience|minimal|histogram|myers}
3103 Choose a diff algorithm\&. The variants are as follows:
3105 \fBdefault\fR, \fBmyers\fR
3107 The basic greedy diff algorithm\&. Currently, this is the default\&.
3112 Spend extra time to make sure the smallest possible diff is produced\&.
3117 Use "patience diff" algorithm when generating patches\&.
3122 This algorithm extends the patience algorithm to "support low\-occurrence common elements"\&.
3125 For instance, if you configured the
3126 \fBdiff\&.algorithm\fR
3127 variable to a non\-default value and want to use the default one, then you have to use
3128 \fB\-\-diff\-algorithm=default\fR
3132 \-\-stat[=<width>[,<name\-width>[,<count>]]]
3134 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
3135 \fB<width>\fR\&. The width of the filename part can be limited by giving another width
3137 after a comma\&. The width of the graph part can be limited by using
3138 \fB\-\-stat\-graph\-width=<width>\fR
3139 (affects all commands generating a stat graph) or by setting
3140 \fBdiff\&.statGraphWidth=<width>\fR
3142 \fBgit format\-patch\fR)\&. By giving a third parameter
3143 \fB<count>\fR, you can limit the output to the first
3147 if there are more\&.
3149 These parameters can also be set individually with
3150 \fB\-\-stat\-width=<width>\fR,
3151 \fB\-\-stat\-name\-width=<name\-width>\fR
3153 \fB\-\-stat\-count=<count>\fR\&.
3156 \-\-compact\-summary
3158 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
3165 \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
3173 Output only the last line of the
3175 format containing total number of modified files, as well as number of added and deleted lines\&.
3178 \-X[<param1,param2,\&...>], \-\-dirstat[=<param1,param2,\&...>]
3180 Output the distribution of relative amount of changes for each sub\-directory\&. The behavior of
3182 can be customized by passing it a comma separated list of parameters\&. The defaults are controlled by the
3183 \fBdiff\&.dirstat\fR
3184 configuration variable (see
3185 \fBgit-config\fR(1))\&. The following parameters are available:
3189 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\&.
3194 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
3198 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
3205 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
3207 behavior, since it does not have to look at the file contents at all\&.
3212 Count changes in a child directory for the parent directory as well\&. Note that when using
3213 \fBcumulative\fR, the sum of the percentages reported may exceed 100%\&. The default (non\-cumulative) behavior can be specified with the
3220 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\&.
3223 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:
3224 \fB\-\-dirstat=files,10,cumulative\fR\&.
3229 Synonym for \-\-dirstat=cumulative
3232 \-\-dirstat\-by\-file[=<param1,param2>\&...]
3234 Synonym for \-\-dirstat=files,param1,param2\&...
3239 Output a condensed summary of extended header information such as creations, renames and mode changes\&.
3242 \-\-patch\-with\-stat
3245 \fB\-p \-\-stat\fR\&.
3250 Separate the commits with NULs instead of with new newlines\&.
3256 has been given, do not munge pathnames and use NULs as output field terminators\&.
3258 Without this option, pathnames with "unusual" characters are quoted as explained for the configuration variable
3259 \fBcore\&.quotePath\fR
3261 \fBgit-config\fR(1))\&.
3266 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
3273 Show only names and status of changed files\&. See the description of the
3274 \fB\-\-diff\-filter\fR
3275 option on what the status letters mean\&. Just like
3276 \fB\-\-name\-only\fR
3277 the file names are often encoded in UTF\-8\&.
3280 \-\-submodule[=<format>]
3282 Specify how differences in submodules are shown\&. When specifying
3283 \fB\-\-submodule=short\fR
3286 format is used\&. This format just shows the names of the commits at the beginning and end of the range\&. When
3289 \fB\-\-submodule=log\fR
3292 format is used\&. This format lists the commits in the range like
3293 \fBgit-submodule\fR(1)
3296 \fB\-\-submodule=diff\fR
3299 format is used\&. This format shows an inline diff of the changes in the submodule contents between the commit range\&. Defaults to
3300 \fBdiff\&.submodule\fR
3303 format if the config option is unset\&.
3308 Show colored diff\&.
3311 \fI=<when>\fR) is the same as
3312 \fB\-\-color=always\fR\&.
3322 Turn off colored diff\&. It is the same as
3323 \fB\-\-color=never\fR\&.
3326 \-\-color\-moved[=<mode>]
3328 Moved lines of code are colored differently\&. The <mode> defaults to
3330 if the option is not given and to
3332 if the option with no mode is given\&. The mode must be one of:
3336 Moved lines are not highlighted\&.
3342 \fBzebra\fR\&. This may change to a more sensible mode in the future\&.
3347 Any line that is added in one location and was removed in another location will be colored with
3348 \fIcolor\&.diff\&.newMoved\fR\&. Similarly
3349 \fIcolor\&.diff\&.oldMoved\fR
3350 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\&.
3355 Blocks of moved text of at least 20 alphanumeric characters are detected greedily\&. The detected blocks are painted using either the
3356 \fIcolor\&.diff\&.{old,new}Moved\fR
3357 color\&. Adjacent blocks cannot be told apart\&.
3362 Blocks of moved text are detected as in
3364 mode\&. The blocks are painted using either the
3365 \fIcolor\&.diff\&.{old,new}Moved\fR
3367 \fIcolor\&.diff\&.{old,new}MovedAlternative\fR\&. The change between the two colors indicates that a new block was detected\&.
3373 \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\&.
3375 is a deprecated synonym\&.
3379 \-\-no\-color\-moved
3381 Turn off move detection\&. This can be used to override configuration settings\&. It is the same as
3382 \fB\-\-color\-moved=no\fR\&.
3385 \-\-color\-moved\-ws=<modes>
3387 This configures how whitespace is ignored when performing the move detection for
3388 \fB\-\-color\-moved\fR\&. These modes can be given as a comma separated list:
3392 Do not ignore whitespace when performing move detection\&.
3395 ignore\-space\-at\-eol
3397 Ignore changes in whitespace at EOL\&.
3400 ignore\-space\-change
3402 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\&.
3407 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3410 allow\-indentation\-change
3412 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\&.
3416 \-\-no\-color\-moved\-ws
3418 Do not ignore whitespace when performing move detection\&. This can be used to override configuration settings\&. It is the same as
3419 \fB\-\-color\-moved\-ws=no\fR\&.
3422 \-\-word\-diff[=<mode>]
3424 Show a word diff, using the <mode> to delimit changed words\&. By default, words are delimited by whitespace; see
3425 \fB\-\-word\-diff\-regex\fR
3426 below\&. The <mode> defaults to
3427 \fIplain\fR, and must be one of:
3431 Highlight changed words using only colors\&. Implies
3440 \fB{+added+}\fR\&. Makes no attempts to escape the delimiters if they appear in the input, so the output may be ambiguous\&.
3445 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
3446 \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
3448 on a line of its own\&.
3453 Disable word diff again\&.
3456 Note that despite the name of the first mode, color is used to highlight the changed parts in all modes if enabled\&.
3459 \-\-word\-diff\-regex=<regex>
3461 Use <regex> to decide what a word is, instead of considering runs of non\-whitespace to be a word\&. Also implies
3462 \fB\-\-word\-diff\fR
3463 unless it was already enabled\&.
3465 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
3467 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\&.
3470 \fB\-\-word\-diff\-regex=\&.\fR
3471 will treat each character as a word and, correspondingly, show differences character by character\&.
3473 The regex can also be set via a diff driver or configuration option, see
3474 \fBgitattributes\fR(5)
3476 \fBgit-config\fR(1)\&. Giving it explicitly overrides any diff driver or configuration setting\&. Diff drivers override configuration settings\&.
3479 \-\-color\-words[=<regex>]
3482 \fB\-\-word\-diff=color\fR
3483 plus (if a regex was specified)
3484 \fB\-\-word\-diff\-regex=<regex>\fR\&.
3489 Turn off rename detection, even when the configuration file gives the default to do so\&.
3492 \-\-[no\-]rename\-empty
3494 Whether to use empty blobs as rename source\&.
3499 Warn if changes introduce conflict markers or whitespace errors\&. What are considered whitespace errors is controlled by
3500 \fBcore\&.whitespace\fR
3501 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\&.
3504 \-\-ws\-error\-highlight=<kind>
3506 Highlight whitespace errors in the
3511 lines of the diff\&. Multiple values are separated by comma,
3513 resets previous values,
3520 \fBold,new,context\fR\&. When this option is not given, and the configuration variable
3521 \fBdiff\&.wsErrorHighlight\fR
3522 is not set, only whitespace errors in
3524 lines are highlighted\&. The whitespace errors are colored with
3525 \fBcolor\&.diff\&.whitespace\fR\&.
3530 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\&.
3536 \fB\-\-full\-index\fR, output a binary diff that can be applied with
3537 \fBgit\-apply\fR\&. Implies
3543 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
3545 hexdigits long that uniquely refers the object\&. In diff\-patch output format,
3546 \fB\-\-full\-index\fR
3547 takes higher precedence, i\&.e\&. if
3548 \fB\-\-full\-index\fR
3549 is specified, full blob names will be shown regardless of
3550 \fB\-\-abbrev\fR\&. Non default number of digits can be specified with
3551 \fB\-\-abbrev=<n>\fR\&.
3554 \-B[<n>][/<m>], \-\-break\-rewrites[=[<n>][/<m>]]
3556 Break complete rewrite changes into pairs of delete and create\&. This serves two purposes:
3558 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
3560 controls this aspect of the \-B option (defaults to 60%)\&.
3562 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)\&.
3564 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
3566 controls this aspect of the \-B option (defaults to 50%)\&.
3568 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\&.
3571 \-M[<n>], \-\-find\-renames[=<n>]
3573 If generating diffs, detect and report renames for each commit\&. For following files across renames while traversing history, see
3574 \fB\-\-follow\fR\&. If
3576 is specified, it is a threshold on the similarity index (i\&.e\&. amount of addition/deletions compared to the file\(cqs size)\&. For example,
3578 means Git should consider a delete/add pair to be a rename if more than 90% of the file hasn\(cqt changed\&. Without a
3580 sign, the number is to be read as a fraction, with a decimal point before it\&. I\&.e\&.,
3582 becomes 0\&.5, and is thus the same as
3583 \fB\-M50%\fR\&. Similarly,
3586 \fB\-M5%\fR\&. To limit detection to exact renames, use
3587 \fB\-M100%\fR\&. The default similarity index is 50%\&.
3590 \-C[<n>], \-\-find\-copies[=<n>]
3592 Detect copies as well as renames\&. See also
3593 \fB\-\-find\-copies\-harder\fR\&. If
3595 is specified, it has the same meaning as for
3599 \-\-find\-copies\-harder
3601 For performance reasons, by default,
3603 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
3605 option has the same effect\&.
3608 \-D, \-\-irreversible\-delete
3610 Omit the preimage for deletes, i\&.e\&. print only the header but not the diff between the preimage and
3611 \fB/dev/null\fR\&. The resulting patch is not meant to be applied with
3614 \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\&.
3616 When used together with
3617 \fB\-B\fR, omit also the preimage in the deletion part of a delete/create pair\&.
3626 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\&.
3629 \-\-diff\-filter=[(A|C|D|M|R|T|U|X|B)\&...[*]]
3631 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
3633 (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\&.
3635 Also, these upper\-case letters can be downcased to exclude\&. E\&.g\&.
3636 \fB\-\-diff\-filter=ad\fR
3637 excludes added and deleted paths\&.
3639 Note that not all diffs can feature all types\&. For instance, copied and renamed entries cannot appear if detection for those types is disabled\&.
3644 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\&.
3646 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
3647 \fB\-S\fR, and keep going until you get the very first version of the block\&.
3649 Binary files are searched as well\&.
3654 Look for differences whose patch text contains added/removed lines that match <regex>\&.
3656 To illustrate the difference between
3657 \fB\-S<regex> \-\-pickaxe\-regex\fR
3659 \fB\-G<regex>\fR, consider a commit with the following diff in the same file:
3665 + return frotz(nitfol, two\->ptr, 1, 0);
3667 \- hit = frotz(nitfol, mf2\&.ptr, 1, 0);
3674 \fBgit log \-G"frotz\e(nitfol"\fR
3675 will show this commit,
3676 \fBgit log \-S"frotz\e(nitfol" \-\-pickaxe\-regex\fR
3677 will not (because the number of occurrences of that string did not change)\&.
3681 is supplied patches of binary files without a textconv filter will be ignored\&.
3686 \fBgitdiffcore\fR(7)
3687 for more information\&.
3690 \-\-find\-object=<object\-id>
3692 Look for differences that change the number of occurrences of the specified object\&. Similar to
3693 \fB\-S\fR, just the argument is different in that it doesn\(cqt search for a specific string but for a specific object id\&.
3695 The object can be a blob or a submodule commit\&. It implies the
3699 to also find trees\&.
3708 finds a change, show all the changes in that changeset, not just the files that contain the change in <string>\&.
3713 Treat the <string> given to
3715 as an extended POSIX regular expression to match\&.
3720 Control the order in which files appear in the output\&. This overrides the
3721 \fBdiff\&.orderFile\fR
3722 configuration variable (see
3723 \fBgit-config\fR(1))\&. To cancel
3724 \fBdiff\&.orderFile\fR, use
3725 \fB\-O/dev/null\fR\&.
3727 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\&.
3729 <orderfile> is parsed as follows:
3733 \h'-04'\(bu\h'+03'\c
3739 Blank lines are ignored, so they can be used as separators for readability\&.
3744 \h'-04'\(bu\h'+03'\c
3750 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\&.
3755 \h'-04'\(bu\h'+03'\c
3761 Each other line contains a single pattern\&.
3764 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"\&.
3767 \-\-skip\-to=<file>, \-\-rotate\-to=<file>
3769 Discard the files before the named <file> from the output (i\&.e\&.
3770 \fIskip to\fR), or move them to the end of the output (i\&.e\&.
3771 \fIrotate to\fR)\&. These were invented primarily for use of the
3773 command, and may not be very useful otherwise\&.
3778 Swap two inputs; that is, show differences from index or on\-disk file to tree contents\&.
3781 \-\-relative[=<path>], \-\-no\-relative
3783 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\&.
3784 \fB\-\-no\-relative\fR
3785 can be used to countermand both
3786 \fBdiff\&.relative\fR
3787 config option and previous
3788 \fB\-\-relative\fR\&.
3793 Treat all files as text\&.
3796 \-\-ignore\-cr\-at\-eol
3798 Ignore carriage\-return at the end of line when doing a comparison\&.
3801 \-\-ignore\-space\-at\-eol
3803 Ignore changes in whitespace at EOL\&.
3806 \-b, \-\-ignore\-space\-change
3808 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\&.
3811 \-w, \-\-ignore\-all\-space
3813 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3816 \-\-ignore\-blank\-lines
3818 Ignore changes whose lines are all blank\&.
3821 \-I<regex>, \-\-ignore\-matching\-lines=<regex>
3823 Ignore changes whose all lines match <regex>\&. This option may be specified more than once\&.
3826 \-\-inter\-hunk\-context=<lines>
3828 Show the context between diff hunks, up to the specified number of lines, thereby fusing hunks that are close to each other\&. Defaults to
3829 \fBdiff\&.interHunkContext\fR
3830 or 0 if the config option is unset\&.
3833 \-W, \-\-function\-context
3835 Show whole function as context lines for each change\&. The function names are determined in the same way as
3837 works out patch hunk headers (see
3838 \fIDefining a custom hunk\-header\fR
3840 \fBgitattributes\fR(5))\&.
3845 Allow an external diff helper to be executed\&. If you set an external diff driver with
3846 \fBgitattributes\fR(5), you need to use this option with
3853 Disallow external diff drivers\&.
3856 \-\-textconv, \-\-no\-textconv
3858 Allow (or disallow) external text conversion filters to be run when comparing binary files\&. See
3859 \fBgitattributes\fR(5)
3860 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
3863 \fBgit-log\fR(1), but not for
3864 \fBgit-format-patch\fR(1)
3865 or diff plumbing commands\&.
3868 \-\-ignore\-submodules[=<when>]
3870 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
3875 \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\&.
3878 \-\-src\-prefix=<prefix>
3880 Show the given source prefix instead of "a/"\&.
3883 \-\-dst\-prefix=<prefix>
3885 Show the given destination prefix instead of "b/"\&.
3890 Do not show any source or destination prefix\&.
3893 \-\-line\-prefix=<prefix>
3895 Prepend an additional prefix to every line of output\&.
3898 \-\-ita\-invisible\-in\-index
3900 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
3901 \fB\-\-ita\-visible\-in\-index\fR\&. Both options are experimental and could be removed in future\&.
3904 For more detailed explanation on these common options, see also \fBgitdiffcore\fR(7)\&.
3905 .SH "GENERATING PATCH TEXT WITH \-P"
3907 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))\&.
3909 What the \-p option produces is slightly different from the traditional diff format:
3919 It is preceded with a "git diff" header that looks like this:
3925 diff \-\-git a/file1 b/file2
3935 filenames are the same unless rename/copy is involved\&. Especially, even for a creation or a deletion,
3939 used in place of the
3945 When rename/copy is involved,
3949 show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively\&.
3960 It is followed by one or more extended header lines:
3968 deleted file mode <mode>
3969 new file mode <mode>
3974 similarity index <number>
3975 dissimilarity index <number>
3976 index <hash>\&.\&.<hash> <mode>
3982 File modes are printed as 6\-digit octal numbers including the file type and file permission bits\&.
3984 Path names in extended headers do not include the
3990 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\&.
3992 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\&.
4003 Pathnames with "unusual" characters are quoted as explained for the configuration variable
4004 \fBcore\&.quotePath\fR
4006 \fBgit-config\fR(1))\&.
4019 files in the output refer to files before the commit, and all the
4021 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:
4027 diff \-\-git a/a b/b
4030 diff \-\-git a/b b/a
4047 Hunk headers mention the name of the function to which the hunk applies\&. See "Defining a custom hunk\-header" in
4048 \fBgitattributes\fR(5)
4049 for details of how to tailor to this to specific languages\&.
4051 .SH "COMBINED DIFF FORMAT"
4053 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\&.
4055 A "combined diff" format looks like this:
4061 diff \-\-combined describe\&.c
4062 index fabadb8,cc95eb0\&.\&.4866510
4063 \-\-\- a/describe\&.c
4065 @@@ \-98,20 \-98,12 +98,20 @@@
4066 return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
4069 \- static void describe(char *arg)
4070 \-static void describe(struct commit *cmit, int last_one)
4071 ++static void describe(char *arg, int last_one)
4073 + unsigned char sha1[20];
4074 + struct commit *cmit;
4075 struct commit_list *list;
4076 static int initialized = 0;
4077 struct commit_name *n;
4079 + if (get_sha1(arg, sha1) < 0)
4080 + usage(describe_usage);
4081 + cmit = lookup_commit_reference(sha1);
4083 + usage(describe_usage);
4087 for_each_ref(get_name);
4103 It is preceded with a "git diff" header, that looks like this (when the
4111 diff \-\-combined file
4117 or like this (when the
4140 It is followed by one or more extended header lines (this example shows a merge with two parents):
4146 index <hash>,<hash>\&.\&.<hash>
4147 mode <mode>,<mode>\&.\&.<mode>
4148 new file mode <mode>
4149 deleted file mode <mode>,<mode>
4156 \fBmode <mode>,<mode>\&.\&.<mode>\fR
4157 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\&.
4168 It is followed by two\-line from\-file/to\-file header
4181 Similar to two\-line header for traditional
4185 is used to signal created or deleted files\&.
4187 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
4202 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\&.
4213 Chunk header format is modified to prevent people from accidentally feeding it to
4214 \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
4222 @@@ <from\-file\-range> <from\-file\-range> <to\-file\-range> @@@
4228 There are (number of parents + 1)
4230 characters in the chunk header for combined diff format\&.
4233 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\&.
4235 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)\&.
4237 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)\&.
4239 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")\&.
4242 \fBgit log \-\-no\-merges\fR
4244 Show the whole commit history, but skip any merges
4247 \fBgit log v2\&.6\&.12\&.\&. include/scsi drivers/scsi\fR
4249 Show all commits since version
4251 that changed any file in the
4258 \fBgit log \-\-since="2 weeks ago" \-\- gitk\fR
4260 Show the changes during the last two weeks to the file
4263 is necessary to avoid confusion with the
4269 \fBgit log \-\-name\-status release\&.\&.test\fR
4271 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\&.
4274 \fBgit log \-\-follow builtin/rev\-list\&.c\fR
4276 Shows the commits that changed
4277 \fBbuiltin/rev\-list\&.c\fR, including those commits that occurred before the file was given its present name\&.
4280 \fBgit log \-\-branches \-\-not \-\-remotes=origin\fR
4282 Shows all commits that are in any of local branches but not in any of remote\-tracking branches for
4284 (what you have that origin doesn\(cqt)\&.
4287 \fBgit log master \-\-not \-\-remotes=*/master\fR
4289 Shows all commits that are in local master but not in any remote repository master branches\&.
4292 \fBgit log \-p \-m \-\-first\-parent\fR
4294 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\&.
4297 \fBgit log \-L \(aq/int main/\(aq,/^}/:main\&.c\fR
4299 Shows how the function
4303 evolved over time\&.
4308 Limits the number of commits to show to 3\&.
4312 Git is to some extent character encoding agnostic\&.
4316 \h'-04'\(bu\h'+03'\c
4322 The contents of the blob objects are uninterpreted sequences of bytes\&. There is no encoding translation at the core level\&.
4327 \h'-04'\(bu\h'+03'\c
4333 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
4335 \fBgit-config\fR(1)),
4337 \fBgitattributes\fR(5)
4339 \fBgitmodules\fR(5))\&.
4341 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\&.
4346 \h'-04'\(bu\h'+03'\c
4352 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
4354 UTF\-16/32, EBCDIC and CJK multi\-byte encodings (GBK, Shift\-JIS, Big5, EUC\-x, CP9xx etc\&.)\&.
4357 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\&.
4369 \fIgit commit\-tree\fR
4370 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
4371 \fBi18n\&.commitEncoding\fR
4381 commitEncoding = ISO\-8859\-1
4387 Commit objects created with the above setting record the value of
4388 \fBi18n\&.commitEncoding\fR
4391 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\&.
4405 and friends look at the
4407 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
4408 \fBi18n\&.logOutputEncoding\fR
4418 logOutputEncoding = ISO\-8859\-1
4424 If you do not have this configuration variable, the value of
4425 \fBi18n\&.commitEncoding\fR
4429 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\&.
4432 See \fBgit-config\fR(1) for core variables and \fBgit-diff\fR(1) for settings related to diff generation\&.
4439 \fIPretty Formats\fR
4440 above\&.) Defaults to
4444 i18n\&.logOutputEncoding
4446 Encoding to use when displaying logs\&. (See
4448 above\&.) Defaults to the value of
4449 \fBi18n\&.commitEncoding\fR
4450 if set, and UTF\-8 otherwise\&.
4453 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:
4459 \fBgit-show\fR(1), and
4460 \fBgit-whatchanged\fR(1)
4462 \fB\-\-abbrev\-commit\fR\&. You may override this option with
4463 \fB\-\-no\-abbrev\-commit\fR\&.
4468 Set the default date\-time mode for the
4470 command\&. Setting a value for log\&.date is similar to using
4477 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\&.
4482 Print out the ref names of any commits that are shown by the log command\&. If
4484 is specified, the ref name prefixes
4489 will not be printed\&. If
4491 is specified, the full ref name (including prefix) will be printed\&. If
4493 is specified, then if the output is going to a terminal, the ref names are shown as if
4495 were given, otherwise no ref names are shown\&. This is the same as the
4501 log\&.initialDecorationSet
4505 only shows decorations for certain known ref namespaces\&. If
4507 is specified, then show all refs as decorations\&.
4510 log\&.excludeDecoration
4512 Exclude the specified patterns from the log decorations\&. This is similar to the
4513 \fB\-\-decorate\-refs\-exclude\fR
4514 command\-line option, but the config option can be overridden by the
4515 \fB\-\-decorate\-refs\fR
4521 Set default diff format to be used for merge commits\&. See
4522 \fB\-\-diff\-merges\fR
4525 for details\&. Defaults to
4536 option was used when a single <path> is given\&. This has the same limitations as
4537 \fB\-\-follow\fR, i\&.e\&. it cannot be used to follow multiple files and does not work well on non\-linear history\&.
4542 A list of colors, separated by commas, that can be used to draw history lines in
4543 \fBgit log \-\-graph\fR\&.
4548 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
4551 \fBgit-whatchanged\fR(1), which normally hide the root commit will now show it\&. True by default\&.
4558 \fBgit-show\fR(1), and
4559 \fBgit-whatchanged\fR(1)
4561 \fB\-\-show\-signature\fR\&.
4568 \fBgit-show\fR(1), and
4569 \fBgit-whatchanged\fR(1)
4571 \fB\-\-use\-mailmap\fR, otherwise assume
4572 \fB\-\-no\-use\-mailmap\fR\&. True by default\&.
4575 notes\&.mergeStrategy
4577 Which merge strategy to choose by default when resolving notes conflicts\&. Must be one of
4582 \fBcat_sort_uniq\fR\&. Defaults to
4583 \fBmanual\fR\&. See "NOTES MERGE STRATEGIES" section of
4585 for more information on each strategy\&.
4587 This setting can be overridden by passing the
4590 \fBgit-notes\fR(1)\&.
4593 notes\&.<name>\&.mergeStrategy
4595 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
4597 for more information on the available strategies\&.
4602 Which ref (or refs, if a glob or specified more than once), in addition to the default set by
4603 \fBcore\&.notesRef\fR
4605 \fBGIT_NOTES_REF\fR, to read notes from when showing commit messages with the
4607 family of commands\&.
4609 This setting can be overridden with the
4610 \fBGIT_NOTES_DISPLAY_REF\fR
4611 environment variable, which must be a colon separated list of refs or globs\&.
4613 A warning will be issued for refs that do not exist, but a glob that does not match any refs is silently ignored\&.
4615 This setting can be disabled by the
4619 family of commands, or by the
4620 \fB\-\-notes=<ref>\fR
4621 option accepted by those commands\&.
4623 The effective value of "core\&.notesRef" (possibly overridden by GIT_NOTES_REF) is also implicitly added to the list of refs to be displayed\&.
4626 notes\&.rewrite\&.<command>
4628 When rewriting commits with <command> (currently
4631 \fBrebase\fR), if this variable is
4632 \fBfalse\fR, git will not copy notes from the original to the rewritten commit\&. Defaults to
4633 \fBtrue\fR\&. See also "\fBnotes\&.rewriteRef\fR" below\&.
4635 This setting can be overridden with the
4636 \fBGIT_NOTES_REWRITE_REF\fR
4637 environment variable, which must be a colon separated list of refs or globs\&.
4642 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
4645 \fBcat_sort_uniq\fR, or
4646 \fBignore\fR\&. Defaults to
4647 \fBconcatenate\fR\&.
4649 This setting can be overridden with the
4650 \fBGIT_NOTES_REWRITE_MODE\fR
4651 environment variable\&.
4656 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\&.
4658 Does not have a default value; you must configure this variable to enable note rewriting\&. Set it to
4659 \fBrefs/notes/commits\fR
4660 to enable rewriting for the default commit notes\&.
4662 Can be overridden with the
4663 \fBGIT_NOTES_REWRITE_REF\fR
4664 environment variable\&. See
4665 \fBnotes\&.rewrite\&.<command>\fR
4666 above for a further description of its format\&.
4670 Part of the \fBgit\fR(1) suite