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.43.0.493.gbc7ee2e5e1
10 .TH "GIT\-LOG" "1" "2024\-01\-30" "Git 2\&.43\&.0\&.493\&.gbc7ee2" "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 a 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 a 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
470 \fB\-\-not\fR\&. When used on the command line before \-\-stdin, the revisions passed through stdin will not be affected by it\&. Conversely, when passed via standard input, the revisions passed on the command line will not be affected by it\&.
475 Pretend as if all the refs in
476 \fBrefs/\fR, along with
477 \fBHEAD\fR, are listed on the command line as
481 \-\-branches[=<pattern>]
483 Pretend as if all the refs in
485 are listed on the command line as
488 is given, limit branches to ones matching given shell glob\&. If pattern lacks
493 at the end is implied\&.
498 Pretend as if all the refs in
500 are listed on the command line as
503 is given, limit tags to ones matching given shell glob\&. If pattern lacks
508 at the end is implied\&.
511 \-\-remotes[=<pattern>]
513 Pretend as if all the refs in
515 are listed on the command line as
518 is given, limit remote\-tracking branches to ones matching given shell glob\&. If pattern lacks
523 at the end is implied\&.
526 \-\-glob=<glob\-pattern>
528 Pretend as if all the refs matching shell glob
529 \fI<glob\-pattern>\fR
530 are listed on the command line as
531 \fI<commit>\fR\&. Leading
532 \fIrefs/\fR, is automatically prepended if missing\&. If pattern lacks
537 at the end is implied\&.
540 \-\-exclude=<glob\-pattern>
542 Do not include refs matching
543 \fI<glob\-pattern>\fR
548 \fB\-\-remotes\fR, or
550 would otherwise consider\&. Repetitions of this option accumulate exclusion patterns up to the next
554 \fB\-\-remotes\fR, or
556 option (other options or arguments do not clear accumulated patterns)\&.
558 The patterns given should not begin with
565 \fB\-\-remotes\fR, respectively, and they must begin with
570 \fB\-\-all\fR\&. If a trailing
572 is intended, it must be given explicitly\&.
575 \-\-exclude\-hidden=[fetch|receive|uploadpack]
577 Do not include refs that would be hidden by
579 \fBgit\-receive\-pack\fR
581 \fBgit\-upload\-pack\fR
582 by consulting the appropriate
583 \fBfetch\&.hideRefs\fR,
584 \fBreceive\&.hideRefs\fR
586 \fBuploadpack\&.hideRefs\fR
587 configuration along with
588 \fBtransfer\&.hideRefs\fR
590 \fBgit-config\fR(1))\&. This option affects the next pseudo\-ref option
594 and is cleared after processing them\&.
599 Pretend as if all objects mentioned by reflogs are listed on the command line as
605 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
606 \fBobjects/info/alternates\fR\&. The set of included objects may be modified by
607 \fBcore\&.alternateRefsCommand\fR, etc\&. See
608 \fBgit-config\fR(1)\&.
613 By default, all working trees will be examined by the following options when there are more than one (see
614 \fBgit-worktree\fR(1)):
618 \fB\-\-indexed\-objects\fR\&. This option forces them to examine the current working tree only\&.
623 Upon seeing an invalid object name in the input, pretend as if the bad input was not given\&.
628 Pretend as if the bad bisection ref
629 \fBrefs/bisect/bad\fR
630 was listed and as if it was followed by
632 and the good bisection refs
633 \fBrefs/bisect/good\-*\fR
634 on the command line\&.
639 In addition to getting arguments from the command line, read them from standard input as well\&. This accepts commits and pseudo\-options like
642 \fB\-\-glob=\fR\&. When a
644 separator is seen, the following input is treated as paths and used to limit the result\&. Flags like
646 which are read via standard input are only respected for arguments passed in the same way and will not influence any subsequent command line arguments\&.
652 \fB\-\-cherry\-pick\fR
653 (see below) but mark equivalent commits with
655 rather than omitting them, and inequivalent ones with
661 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\&.
663 For example, if you have two branches,
666 \fBB\fR, a usual way to list all commits on only one side of them is with
667 \fB\-\-left\-right\fR
668 (see the example below in the description of the
669 \fB\-\-left\-right\fR
670 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\&.
673 \-\-left\-only, \-\-right\-only
675 List only commits on the respective side of a symmetric difference, i\&.e\&. only those which would be marked
680 \fB\-\-left\-right\fR\&.
683 \fB\-\-cherry\-pick \-\-right\-only A\&.\&.\&.B\fR
684 omits those commits from
688 or are patch\-equivalent to a commit in
689 \fBA\fR\&. In other words, this lists the
692 \fBgit cherry A B\fR\&. More precisely,
693 \fB\-\-cherry\-pick \-\-right\-only \-\-no\-merges\fR
694 gives the exact list\&.
700 \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
701 \fBgit log \-\-cherry upstream\&.\&.\&.mybranch\fR, similar to
702 \fBgit cherry upstream mybranch\fR\&.
705 \-g, \-\-walk\-reflogs
707 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,
709 \fIcommit1\&.\&.commit2\fR, and
710 \fIcommit1\&.\&.\&.commit2\fR
711 notations cannot be used)\&.
719 (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
723 is the reverse\-chronological index in the reflog) or as
724 \fBref@{timestamp}\fR
725 (with the timestamp for that entry), depending on a few rules:
735 If the starting point is specified as
736 \fBref@{Nth}\fR, show the index format\&.
747 If the starting point was specified as
748 \fBref@{now}\fR, show the timestamp format\&.
759 If neither was used, but
761 was given on the command line, show the timestamp in the format requested by
773 Otherwise, show the index format\&.
777 \fB\-\-pretty=oneline\fR, the commit message is prefixed with this information on the same line\&. This option cannot be combined with
778 \fB\-\-reverse\fR\&. See also
779 \fBgit-reflog\fR(1)\&.
782 \fB\-\-pretty=reference\fR, this information will not be shown at all\&.
787 After a failed merge, show refs that touch files having a conflict and don\(cqt exist on all heads to merge\&.
792 Output excluded boundary commits\&. Boundary commits are prefixed with
795 .SS "History Simplification"
797 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\&.
799 The following options select the commits to be shown:
803 Commits modifying the given <paths> are selected\&.
806 \-\-simplify\-by\-decoration
808 Commits that are referred by some branch or tag are selected\&.
811 Note that extra commits can be shown to give a meaningful history\&.
813 The following options affect the way the simplification is performed:
817 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)
822 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\&.
827 Same as the default mode, but does not prune some history\&.
832 Only the selected commits are shown, plus some to have a meaningful history\&.
837 All commits in the simplified history are shown\&.
843 \fB\-\-full\-history\fR
844 to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge\&.
847 \-\-ancestry\-path[=<commit>]
849 When given a range of commits to display (e\&.g\&.
850 \fIcommit1\&.\&.commit2\fR
852 \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
854 (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\&.
857 A more detailed explanation follows\&.
859 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\&.)
861 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:
867 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
871 `\-\-\-\-\-\-\-\-\-\-\-\-\-\*(Aq X
878 The horizontal line of history A\-\-\-Q is taken to be the first parent of each merge\&. The commits are:
889 is the initial commit, in which
891 exists with contents \(lqasdf\(rq, and a file
893 exists with contents \(lqquux\(rq\&. Initial commits are compared to an empty tree, so
909 contains just \(lqfoo\(rq\&.
921 contains the same change as
924 is trivial and hence TREESAME to all parents\&.
937 \fBfoo\fR, but its merge
939 changes it to \(lqfoobar\(rq, so it is not TREESAME to any parent\&.
953 to \(lqbaz\(rq\&. Its merge
955 combines the strings from
959 to \(lqfoobarbaz\(rq; i\&.e\&., it is not TREESAME to any parent\&.
973 to \(lqxyzzy\(rq, and its merge
975 combines the strings to \(lqquux xyzzy\(rq\&.
991 is an independent root commit that added a new file
1009 \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\&.
1013 Commits are included if they are not TREESAME to any parent (though this can be changed, see
1015 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\&.
1023 \&.\-A\-\-\-N\-\-\-O
1025 I\-\-\-\-\-\-\-\-\-D
1031 Note how the rule to only follow the TREESAME parent, if one is available, removed
1033 from consideration entirely\&.
1036 \fBN\fR, but is TREESAME\&. Root commits are compared to an empty tree, so
1040 Parent/child relations are only visible with
1041 \fB\-\-parents\fR, but that does not affect the commits selected in default mode, so we have shown the parent lines\&.
1044 \-\-full\-history without parent rewriting
1046 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
1059 was excluded because it is TREESAME to both parents\&.
1064 were all walked, but only
1066 was !TREESAME, so the others do not appear\&.
1068 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\&.
1071 \-\-full\-history with parent rewriting
1073 Ordinary commits are only included if they are !TREESAME (though this can be changed, see
1077 Merges are always included\&. However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves\&. This results in
1083 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
1087 `\-\-\-\-\-\-\-\-\-\-\-\-\-\*(Aq
1094 \fB\-\-full\-history\fR
1095 without rewriting above\&. Note that
1097 was pruned away because it is TREESAME, but the parent list of P was rewritten to contain
1098 \fBE\fR\*(Aqs parent
1099 \fBI\fR\&. The same happened for
1109 In addition to the above settings, you can change whether TREESAME affects inclusion:
1113 Commits that are walked are included if they are not TREESAME to any parent\&.
1118 All commits that are walked are included\&.
1121 \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\&.
1124 \-\-simplify\-merges
1126 First, build a history graph in the same way that
1127 \fB\-\-full\-history\fR
1128 with parent rewriting does (see above)\&.
1130 Then simplify each commit
1134 in the final history according to the following rules:
1138 \h'-04'\(bu\h'+03'\c
1152 \h'-04'\(bu\h'+03'\c
1162 with its simplification
1163 \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\&.
1168 \h'-04'\(bu\h'+03'\c
1174 If after this parent rewriting,
1176 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\&.
1179 The effect of this is best shown by way of comparing to
1180 \fB\-\-full\-history\fR
1181 with parent rewriting\&. The example turns into:
1187 \&.\-A\-\-\-M\-\-\-N\-\-\-O
1191 `\-\-\-\-\-\-\-\-\-\*(Aq
1197 Note the major differences in
1202 \fB\-\-full\-history\fR:
1206 \h'-04'\(bu\h'+03'\c
1212 \fBN\fR\*(Aqs parent list had
1214 removed, because it is an ancestor of the other parent
1217 remained because it is !TREESAME\&.
1222 \h'-04'\(bu\h'+03'\c
1228 \fBP\fR\*(Aqs parent list similarly had
1232 was then removed completely, because it had one parent and is TREESAME\&.
1237 \h'-04'\(bu\h'+03'\c
1243 \fBQ\fR\*(Aqs parent list had
1248 was then removed, because it was a TREESAME root\&.
1250 was then removed completely, because it had one parent and is TREESAME\&.
1254 There is another simplification mode available:
1256 \-\-ancestry\-path[=<commit>]
1258 Limit the displayed commits to those which are an ancestor of <commit>, or which are a descendant of <commit>, or are <commit> itself\&.
1260 As an example use case, consider the following commit history:
1266 D\-\-\-E\-\-\-\-\-\-\-F
1268 B\-\-\-C\-\-\-G\-\-\-H\-\-\-I\-\-\-J
1270 A\-\-\-\-\-\-\-K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1278 computes the set of commits that are ancestors of
1279 \fBM\fR, but excludes the ones that are ancestors of
1280 \fBD\fR\&. This is useful to see what happened to the history leading to
1283 \fBD\fR, in the sense that \(lqwhat does
1285 have that did not exist in
1286 \fBD\fR\(rq\&. The result in this example would be all the commits, except
1292 itself, of course)\&.
1294 When we want to find out what commits in
1296 are contaminated with the bug introduced by
1298 and need fixing, however, we might want to view only the subset of
1300 that are actually descendants of
1301 \fBD\fR, i\&.e\&. excluding
1304 \fBK\fR\&. This is exactly what the
1305 \fB\-\-ancestry\-path\fR
1306 option does\&. Applied to the
1308 range, it results in:
1316 G\-\-\-H\-\-\-I\-\-\-J
1325 \fB\-\-ancestry\-path=D\fR
1327 \fB\-\-ancestry\-path\fR
1328 which means the same thing when applied to the
1330 range but is just more explicit\&.
1332 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
1334 which contain that topic in their ancestry path\&. So, using
1335 \fB\-\-ancestry\-path=H D\&.\&.M\fR
1336 for example would result in:
1344 G\-\-\-H\-\-\-I\-\-\-J
1353 \fB\-\-ancestry\-path=K D\&.\&.M\fR
1360 K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1368 Before discussing another option, \fB\-\-show\-pulls\fR, we need to create a new example history\&.
1370 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:
1376 \&.\-A\-\-\-M\-\-\-\-\-C\-\-N\-\-\-O\-\-\-P
1378 I B \e R\-\*(Aq`\-Z\*(Aq /
1381 `\-\-\-X\-\-\*(Aq `\-\-\-Y\-\-\*(Aq
1388 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\&.
1390 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:
1403 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:
1409 \&.\-A\-\-\-M\-\-\-\-\-\-\-\-N\-\-\-O\-\-\-P
1411 I B \e R\-\*(Aq`\-\-\*(Aq /
1414 `\-\-\-X\-\-\*(Aq `\-\-\-\-\-\-\*(Aq
1421 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\&.
1423 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:
1429 \&.\-A\-\-\-M\-\-\&.
1441 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\&.
1443 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\&.
1445 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\&.
1449 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\&.
1451 When a merge commit is included by
1452 \fB\-\-show\-pulls\fR, the merge is treated as if it "pulled" the change from another branch\&. When using
1453 \fB\-\-show\-pulls\fR
1454 on this example (and no other options) the resulting graph is:
1460 I\-\-\-X\-\-\-R\-\-\-N
1466 Here, the merge commits
1470 are included because they pulled the commits
1474 into the base branch, respectively\&. These merges are the reason the commits
1478 do not appear in the default history\&.
1481 \fB\-\-show\-pulls\fR
1483 \fB\-\-simplify\-merges\fR, the graph includes all of the necessary information:
1489 \&.\-A\-\-\-M\-\-\&. N
1503 \fBR\fR, the edge from
1507 was simplified away\&. However,
1509 still appears in the history as an important commit because it "pulled" the change
1511 into the main branch\&.
1514 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)\&.
1515 .SS "Commit Ordering"
1517 By default, the commits are shown in reverse chronological order\&.
1521 Show no parents before all of its children are shown, but otherwise show commits in the commit timestamp order\&.
1524 \-\-author\-date\-order
1526 Show no parents before all of its children are shown, but otherwise show commits in the author timestamp order\&.
1531 Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed\&.
1533 For example, in a commit history like this:
1539 \-\-\-1\-\-\-\-2\-\-\-\-4\-\-\-\-7
1541 3\-\-\-\-5\-\-\-\-6\-\-\-\-8\-\-\-
1547 where the numbers denote the order of commit timestamps,
1550 \fB\-\-date\-order\fR
1551 show the commits in the timestamp order: 8 7 6 5 4 3 2 1\&.
1554 \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\&.
1559 Output the commits chosen to be shown (see Commit Limiting section above) in reverse order\&. Cannot be combined with
1560 \fB\-\-walk\-reflogs\fR\&.
1562 .SS "Object Traversal"
1564 These options are mostly targeted for packing of Git repositories\&.
1566 \-\-no\-walk[=(sorted|unsorted)]
1568 Only show the given commits, but do not traverse their ancestors\&. This has no effect if a range is specified\&. If the argument
1570 is given, the commits are shown in the order they were given on the command line\&. Otherwise (if
1572 or no argument was given), the commits are shown in reverse chronological order by commit time\&. Cannot be combined with
1578 Overrides a previous
1579 \fB\-\-no\-walk\fR\&.
1581 .SS "Commit Formatting"
1583 \-\-pretty[=<format>], \-\-format=<format>
1585 Pretty\-print the contents of the commit logs in a given format, where
1596 \fIformat:<string>\fR
1598 \fItformat:<string>\fR\&. When
1600 is none of the above, and has
1602 in it, it acts as if
1603 \fI\-\-pretty=tformat:<format>\fR
1606 See the "PRETTY FORMATS" section for some additional details for each format\&. When
1608 part is omitted, it defaults to
1611 Note: you can specify the default pretty format in the repository configuration (see
1612 \fBgit-config\fR(1))\&.
1617 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\&.
1619 This should make "\-\-pretty=oneline" a whole lot more readable for people using 80\-column terminals\&.
1622 \-\-no\-abbrev\-commit
1624 Show the full 40\-byte hexadecimal commit object name\&. This negates
1625 \fB\-\-abbrev\-commit\fR, either explicit or implied by other options such as "\-\-oneline"\&. It also overrides the
1626 \fBlog\&.abbrevCommit\fR
1632 This is a shorthand for "\-\-pretty=oneline \-\-abbrev\-commit" used together\&.
1635 \-\-encoding=<encoding>
1637 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
1639 and we are outputting in
1640 \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\&.
1643 \-\-expand\-tabs=<n>, \-\-expand\-tabs, \-\-no\-expand\-tabs
1645 Perform a tab expansion (replace each tab with enough spaces to fill to the next display column that is a multiple of
1646 \fI<n>\fR) in the log message before showing it in the output\&.
1647 \fB\-\-expand\-tabs\fR
1648 is a short\-hand for
1649 \fB\-\-expand\-tabs=8\fR, and
1650 \fB\-\-no\-expand\-tabs\fR
1651 is a short\-hand for
1652 \fB\-\-expand\-tabs=0\fR, which disables tab expansion\&.
1654 By default, tabs are expanded in pretty formats that indent the log message by 4 spaces (i\&.e\&.
1655 \fImedium\fR, which is the default,
1663 \fBgit-notes\fR(1)) that annotate the commit, when showing the commit log message\&. This is the default for
1667 \fBgit whatchanged\fR
1668 commands when there is no
1670 \fB\-\-format\fR, or
1672 option given on the command line\&.
1674 By default, the notes shown are from the notes refs listed in the
1675 \fBcore\&.notesRef\fR
1677 \fBnotes\&.displayRef\fR
1678 variables (or corresponding environment overrides)\&. See
1684 argument, use the ref to find the notes to display\&. The ref can specify the full refname when it begins with
1685 \fBrefs/notes/\fR; when it begins with
1690 is prefixed to form the full name of the ref\&.
1692 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)\&.
1697 Do not show notes\&. This negates the above
1699 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"\&.
1702 \-\-show\-notes\-by\-default
1704 Show the default notes unless options for displaying specific notes are given\&.
1707 \-\-show\-notes[=<ref>], \-\-[no\-]standard\-notes
1709 These options are deprecated\&. Use the above \-\-notes/\-\-no\-notes options instead\&.
1714 Check the validity of a signed commit object by passing the signature to
1715 \fBgpg \-\-verify\fR
1716 and show the output\&.
1722 \fB\-\-date=relative\fR\&.
1727 Only takes effect for dates shown in human\-readable format, such as when using
1730 config variable sets a default value for the log command\(cqs
1732 option\&. By default, dates are shown in the original time zone (either committer\(cqs or author\(cqs)\&. If
1734 is appended to the format (e\&.g\&.,
1735 \fBiso\-local\fR), the user\(cqs local time zone is used instead\&.
1737 \fB\-\-date=relative\fR
1738 shows dates relative to the current time, e\&.g\&. \(lq2 hours ago\(rq\&. The
1740 option has no effect for
1741 \fB\-\-date=relative\fR\&.
1743 \fB\-\-date=local\fR
1745 \fB\-\-date=default\-local\fR\&.
1749 \fB\-\-date=iso8601\fR) shows timestamps in a ISO 8601\-like format\&. The differences to the strict ISO 8601 format are:
1753 \h'-04'\(bu\h'+03'\c
1759 a space instead of the
1766 \h'-04'\(bu\h'+03'\c
1772 a space between time and time zone
1777 \h'-04'\(bu\h'+03'\c
1783 no colon between hours and minutes of the time zone
1786 \fB\-\-date=iso\-strict\fR
1788 \fB\-\-date=iso8601\-strict\fR) shows timestamps in strict ISO 8601 format\&.
1792 \fB\-\-date=rfc2822\fR) shows timestamps in RFC 2822 format, often found in email messages\&.
1794 \fB\-\-date=short\fR
1795 shows only the date, but not the time, in
1800 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
1804 with four digits; the first two are hours, and the second two are minutes)\&. I\&.e\&., as if the timestamp were formatted with
1805 \fBstrftime("%s %z")\fR)\&. Note that the
1807 option does not affect the seconds\-since\-epoch value (which is always measured in UTC), but does switch the accompanying timezone value\&.
1809 \fB\-\-date=human\fR
1810 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\&.
1813 shows the date as a Unix epoch timestamp (seconds since 1970)\&. As with
1814 \fB\-\-raw\fR, this is always in UTC and therefore
1818 \fB\-\-date=format:\&.\&.\&.\fR
1822 \fBstrftime\fR, except for %s, %z, and %Z, which are handled internally\&. Use
1823 \fB\-\-date=format:%c\fR
1824 to show the date in your system locale\(cqs preferred format\&. See the
1826 manual for a complete list of format placeholders\&. When using
1827 \fB\-local\fR, the correct syntax is
1828 \fB\-\-date=format\-local:\&.\&.\&.\fR\&.
1830 \fB\-\-date=default\fR
1831 is the default format, and is based on ctime(3) output\&. It shows a single line with three\-letter day of the week, three\-letter month, day\-of\-month, hour\-minute\-seconds in "HH:MM:SS" format, followed by 4\-digit year, plus timezone information, unless the local time zone is used, e\&.g\&.
1832 \fBThu Jan 1 00:00:00 1970 +0000\fR\&.
1837 Print also the parents of the commit (in the form "commit parent\&...")\&. Also enables parent rewriting, see
1838 \fIHistory Simplification\fR
1844 Print also the children of the commit (in the form "commit child\&...")\&. Also enables parent rewriting, see
1845 \fIHistory Simplification\fR
1851 Mark which side of a symmetric difference a commit is reachable from\&. Commits from the left side are prefixed with
1853 and those from the right with
1854 \fB>\fR\&. If combined with
1855 \fB\-\-boundary\fR, those commits are prefixed with
1858 For example, if you have this topology:
1864 y\-\-\-b\-\-\-b branch B
1868 o\-\-\-x\-\-\-a\-\-\-a branch A
1874 you would get an output like this:
1880 $ git rev\-list \-\-left\-right \-\-boundary \-\-pretty=oneline A\&.\&.\&.B
1882 >bbbbbbb\&.\&.\&. 3rd on b
1883 >bbbbbbb\&.\&.\&. 2nd on b
1884 <aaaaaaa\&.\&.\&. 3rd on a
1885 <aaaaaaa\&.\&.\&. 2nd on a
1886 \-yyyyyyy\&.\&.\&. 1st on b
1887 \-xxxxxxx\&.\&.\&. 1st on a
1897 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
1898 \fB\-\-no\-walk\fR\&.
1900 This enables parent rewriting, see
1901 \fIHistory Simplification\fR
1905 \fB\-\-topo\-order\fR
1906 option by default, but the
1907 \fB\-\-date\-order\fR
1908 option may also be specified\&.
1911 \-\-show\-linear\-break[=<barrier>]
1913 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
1915 is specified, it is the string that will be shown instead of the default one\&.
1917 .SH "PRETTY FORMATS"
1919 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\&.
1921 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:
1925 \h'-04'\(bu\h'+03'\c
1937 <hash> <title\-line>
1943 This is designed to be as compact as possible\&.
1948 \h'-04'\(bu\h'+03'\c
1980 \h'-04'\(bu\h'+03'\c
1994 Date: <author\-date>
2014 <full\-commit\-message>
2023 \h'-04'\(bu\h'+03'\c
2057 <full\-commit\-message>
2066 \h'-04'\(bu\h'+03'\c
2080 AuthorDate: <author\-date>
2082 CommitDate: <committer\-date>
2102 <full\-commit\-message>
2111 \h'-04'\(bu\h'+03'\c
2123 <abbrev\-hash> (<title\-line>, <short\-author\-date>)
2129 This format is used to refer to another commit in a commit message and is the same as
2130 \fB\-\-pretty=\*(Aqformat:%C(auto)%h (%s, %ad)\*(Aq\fR\&. By default, the date is formatted with
2131 \fB\-\-date=short\fR
2134 option is explicitly specified\&. As with any
2136 with format placeholders, its output is not affected by other options like
2139 \fB\-\-walk\-reflogs\fR\&.
2144 \h'-04'\(bu\h'+03'\c
2158 Date: <author\-date>
2159 Subject: [PATCH] <title\-line>
2169 <full\-commit\-message>
2178 \h'-04'\(bu\h'+03'\c
2187 \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\&.
2192 \h'-04'\(bu\h'+03'\c
2202 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
2204 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
2205 \fBgit log \-\-raw\fR\&. To get full object names in a raw diff format, use
2206 \fB\-\-no\-abbrev\fR\&.
2211 \h'-04'\(bu\h'+03'\c
2217 \fIformat:<format\-string>\fR
2220 \fIformat:<format\-string>\fR
2221 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
2227 \fIformat:"The author of %h was %an, %ar%nThe title was >>%s<<%n"\fR
2228 would show something like this:
2234 The author of fe6e0ee was Junio C Hamano, 23 hours ago
2235 The title was >>t4119: test autocomputing \-p<n> for traditional diff input\&.<<
2241 The placeholders are:
2245 \h'-04'\(bu\h'+03'\c
2251 Placeholders that expand to a single literal character:
2267 followed by two hexadecimal digits is replaced with a byte with the hexadecimal digits\*(Aq value (we will call this "literal formatting code" in the rest of this document)\&.
2273 \h'-04'\(bu\h'+03'\c
2279 Placeholders that affect formatting of later placeholders:
2288 switch color to green
2293 switch color to blue
2303 color specification, as described under Values in the "CONFIGURATION FILE" section of
2304 \fBgit-config\fR(1)\&. By default, colors are shown only when enabled for log output (by
2306 \fBcolor\&.ui\fR, or
2307 \fB\-\-color\fR, and respecting the
2309 settings of the former if we are going to a terminal)\&.
2310 \fB%C(auto,\&.\&.\&.)\fR
2311 is accepted as a historical synonym for the default (e\&.g\&.,
2312 \fB%C(auto,red)\fR)\&. Specifying
2313 \fB%C(always,\&.\&.\&.)\fR
2314 will show the colors even when color is not otherwise enabled (though consider just using
2315 \fB\-\-color=always\fR
2316 to enable color for the whole output, including this format and anything else git might color)\&.
2319 \fB%C(auto)\fR) will turn on auto coloring on the next placeholders until the color is switched again\&.
2324 left (\fB<\fR), right (\fB>\fR) or boundary (\fB\-\fR) mark
2327 \fI%w([<w>[,<i1>[,<i2>]]])\fR
2329 switch line wrapping, like the \-w option of
2330 \fBgit-shortlog\fR(1)\&.
2333 \fI%<( <N> [,trunc|ltrunc|mtrunc])\fR
2335 make the next placeholder take at least N column widths, padding spaces on the right if necessary\&. Optionally truncate (with ellipsis
2336 \fI\&.\&.\fR) at the left (ltrunc)
2337 \fB\&.\&.ft\fR, the middle (mtrunc)
2338 \fBmi\&.\&.le\fR, or the end (trunc)
2339 \fBrig\&.\&.\fR, if the output is longer than N columns\&. Note 1: that truncating only works correctly with N >= 2\&. Note 2: spaces around the N and M (see below) values are optional\&. Note 3: Emojis and other wide characters will take two display columns, which may over\-run column boundaries\&. Note 4: decomposed character combining marks may be misplaced at padding boundaries\&.
2344 make the next placeholder take at least until Mth display column, padding spaces on the right if necessary\&. Use negative M values for column positions measured from the right hand edge of the terminal window\&.
2347 \fI%>( <N> )\fR, \fI%>|( <M> )\fR
2352 respectively, but padding spaces on the left
2355 \fI%>>( <N> )\fR, \fI%>>|( <M> )\fR
2360 respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces
2363 \fI%><( <N> )\fR, \fI%><|( <M> )\fR
2368 respectively, but padding both sides (i\&.e\&. the text is centered)
2374 \h'-04'\(bu\h'+03'\c
2380 Placeholders that expand to information extracted from the commit:
2389 abbreviated commit hash
2399 abbreviated tree hash
2409 abbreviated parent hashes
2419 author name (respecting \&.mailmap, see
2420 \fBgit-shortlog\fR(1)
2432 author email (respecting \&.mailmap, see
2433 \fBgit-shortlog\fR(1)
2440 author email local\-part (the part before the
2447 author local\-part (see
2448 \fI%al\fR) respecting \&.mailmap, see
2449 \fBgit-shortlog\fR(1)
2456 author date (format respects \-\-date= option)
2461 author date, RFC2822 style
2466 author date, relative
2471 author date, UNIX timestamp
2476 author date, ISO 8601\-like format
2481 author date, strict ISO 8601 format
2486 author date, short format (\fBYYYY\-MM\-DD\fR)
2491 author date, human style (like the
2492 \fB\-\-date=human\fR
2494 \fBgit-rev-list\fR(1))
2504 committer name (respecting \&.mailmap, see
2505 \fBgit-shortlog\fR(1)
2517 committer email (respecting \&.mailmap, see
2518 \fBgit-shortlog\fR(1)
2525 committer email local\-part (the part before the
2532 committer local\-part (see
2533 \fI%cl\fR) respecting \&.mailmap, see
2534 \fBgit-shortlog\fR(1)
2541 committer date (format respects \-\-date= option)
2546 committer date, RFC2822 style
2551 committer date, relative
2556 committer date, UNIX timestamp
2561 committer date, ISO 8601\-like format
2566 committer date, strict ISO 8601 format
2571 committer date, short format (\fBYYYY\-MM\-DD\fR)
2576 committer date, human style (like the
2577 \fB\-\-date=human\fR
2579 \fBgit-rev-list\fR(1))
2584 ref names, like the \-\-decorate option of
2590 ref names without the " (", ")" wrapping\&.
2593 \fI%(decorate[:<options>])\fR
2595 ref names with custom decorations\&. The
2597 string may be followed by a colon and zero or more comma\-separated options\&. Option values may contain literal formatting codes\&. These must be used for commas (\fB%x2C\fR) and closing parentheses (\fB%x29\fR), due to their role in the option syntax\&.
2601 \h'-04'\(bu\h'+03'\c
2607 \fIprefix=<value>\fR: Shown before the list of ref names\&. Defaults to "\ \&\fB(\fR"\&.
2612 \h'-04'\(bu\h'+03'\c
2618 \fIsuffix=<value>\fR: Shown after the list of ref names\&. Defaults to "\fB)\fR"\&.
2623 \h'-04'\(bu\h'+03'\c
2629 \fIseparator=<value>\fR: Shown between ref names\&. Defaults to "\fB,\fR\ \&"\&.
2634 \h'-04'\(bu\h'+03'\c
2640 \fIpointer=<value>\fR: Shown between HEAD and the branch it points to, if any\&. Defaults to "\ \&\fB\->\fR\ \&"\&.
2645 \h'-04'\(bu\h'+03'\c
2651 \fItag=<value>\fR: Shown before tag names\&. Defaults to "\fBtag:\fR\ \&"\&.
2654 For example, to produce decorations with no wrapping or tag annotations, and spaces as separators:
2656 \fB%(decorate:prefix=,suffix=,tag=,separator= )\fR
2659 \fI%(describe[:<options>])\fR
2661 human\-readable name, like
2662 \fBgit-describe\fR(1); empty string for undescribable commits\&. The
2664 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\&.
2668 \h'-04'\(bu\h'+03'\c
2674 \fItags[=<bool\-value>]\fR: Instead of only considering annotated tags, consider lightweight tags as well\&.
2679 \h'-04'\(bu\h'+03'\c
2685 \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\&.
2690 \h'-04'\(bu\h'+03'\c
2696 \fImatch=<pattern>\fR: Only consider tags matching the given
2698 pattern, excluding the "refs/tags/" prefix\&.
2703 \h'-04'\(bu\h'+03'\c
2709 \fIexclude=<pattern>\fR: Do not consider tags matching the given
2711 pattern, excluding the "refs/tags/" prefix\&.
2717 ref name given on the command line by which the commit was reached (like
2718 \fBgit log \-\-source\fR), only works with
2734 sanitized subject line, suitable for a filename
2744 raw body (unwrapped subject and body)
2754 raw verification message from GPG for a signed commit
2759 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
2764 show the name of the signer for a signed commit
2769 show the key used to sign a signed commit
2774 show the fingerprint of the key used to sign a signed commit
2779 show the fingerprint of the primary key whose subkey was used to sign a signed commit
2784 show the trust level for the key used to sign a signed commit
2789 reflog selector, e\&.g\&.,
2790 \fBrefs/stash@{1}\fR
2792 \fBrefs/stash@{2 minutes ago}\fR; the format follows the rules described for the
2794 option\&. The portion before the
2796 is the refname as given on the command line (so
2797 \fBgit log \-g refs/heads/master\fR
2799 \fBrefs/heads/master@{0}\fR)\&.
2804 shortened reflog selector; same as
2805 \fB%gD\fR, but the refname portion is shortened for human readability (so
2806 \fBrefs/heads/master\fR
2813 reflog identity name
2818 reflog identity name (respecting \&.mailmap, see
2819 \fBgit-shortlog\fR(1)
2826 reflog identity email
2831 reflog identity email (respecting \&.mailmap, see
2832 \fBgit-shortlog\fR(1)
2842 \fI%(trailers[:<options>])\fR
2844 display the trailers of the body as interpreted by
2845 \fBgit-interpret-trailers\fR(1)\&. The
2847 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\&.
2851 \h'-04'\(bu\h'+03'\c
2857 \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
2859 option so that non\-trailer lines in the trailer block are hidden\&. If that is not desired it can be disabled with
2860 \fBonly=false\fR\&. E\&.g\&.,
2861 \fB%(trailers:key=Reviewed\-by)\fR
2862 shows trailer lines with key
2863 \fBReviewed\-by\fR\&.
2868 \h'-04'\(bu\h'+03'\c
2874 \fIonly[=<bool>]\fR: select whether non\-trailer lines from the trailer block should be included\&.
2879 \h'-04'\(bu\h'+03'\c
2885 \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
2887 as it would otherwise be parsed as next option\&. E\&.g\&.,
2888 \fB%(trailers:key=Ticket,separator=%x2C )\fR
2889 shows all trailer lines whose key is "Ticket" separated by a comma and a space\&.
2894 \h'-04'\(bu\h'+03'\c
2900 \fIunfold[=<bool>]\fR: make it behave as if interpret\-trailer\(cqs
2902 option was given\&. E\&.g\&.,
2903 \fB%(trailers:only,unfold=true)\fR
2904 unfolds and shows all trailer lines\&.
2909 \h'-04'\(bu\h'+03'\c
2915 \fIkeyonly[=<bool>]\fR: only show the key part of the trailer\&.
2920 \h'-04'\(bu\h'+03'\c
2926 \fIvalueonly[=<bool>]\fR: only show the value part of the trailer\&.
2931 \h'-04'\(bu\h'+03'\c
2937 \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
2938 \fIseparator=<sep>\fR
2949 .nr an-no-space-flag 1
2957 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\&.
2961 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\&.
2963 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\&.
2965 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\&.
2967 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\&.
2971 \h'-04'\(bu\h'+03'\c
2981 format works exactly like
2982 \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:
2988 $ git log \-2 \-\-pretty=format:%h 4da45bef \e
2989 | perl \-pe \*(Aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\*(Aq
2991 7134973 \-\- NO NEWLINE
2993 $ git log \-2 \-\-pretty=tformat:%h 4da45bef \e
2994 | perl \-pe \*(Aq$_ \&.= " \-\- NO NEWLINE\en" unless /\en/\*(Aq
3002 In addition, any unrecognized string that has a
3004 in it is interpreted as if it has
3006 in front of it\&. For example, these two are equivalent:
3012 $ git log \-2 \-\-pretty=tformat:%h 4da45bef
3013 $ git log \-2 \-\-pretty=%h 4da45bef
3020 .SH "DIFF FORMATTING"
3022 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\&.
3024 Note that unless one of \fB\-\-diff\-merges\fR variants (including short \fB\-m\fR, \fB\-c\fR, \fB\-\-cc\fR, and \fB\-\-dd\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 for merge commits\&.
3029 the section called \(lqGENERATING PATCH TEXT WITH \-P\(rq)\&.
3034 Suppress all output from the diff machinery\&. Useful for commands like
3036 that show the patch by default to squelch their output, or to cancel the effect of options like
3039 earlier on the command line in an alias\&.
3044 Show diffs for merge commits in the default format\&. This is similar to
3045 \fI\-\-diff\-merges=on\fR, except
3047 will produce no output unless
3054 Produce combined diff output for merge commits\&. Shortcut for
3055 \fI\-\-diff\-merges=combined \-p\fR\&.
3060 Produce dense combined diff output for merge commits\&. Shortcut for
3061 \fI\-\-diff\-merges=dense\-combined \-p\fR\&.
3066 Produce diff with respect to first parent for both merge and regular commits\&. Shortcut for
3067 \fI\-\-diff\-merges=first\-parent \-p\fR\&.
3072 Produce remerge\-diff output for merge commits\&. Shortcut for
3073 \fI\-\-diff\-merges=remerge \-p\fR\&.
3076 \-\-no\-diff\-merges
3079 \fI\-\-diff\-merges=off\fR\&.
3082 \-\-diff\-merges=<format>
3084 Specify diff format to be used for merge commits\&. Default is
3087 \fB\-\-first\-parent\fR
3088 is in use, in which case
3092 The following formats are supported:
3096 Disable output of diffs for merge commits\&. Useful to override implied value\&.
3101 Make diff output for merge commits to be shown in the default format\&. The default format can be changed using
3102 \fBlog\&.diffMerges\fR
3103 configuration variable, whose default value is
3109 Show full diff with respect to first parent\&. This is the same format as
3111 produces for non\-merge commits\&.
3116 Show full diff with respect to each of parents\&. Separate log entry and diff is generated for each parent\&.
3121 Show 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\&.
3126 Further compress output produced by
3127 \fB\-\-diff\-merges=combined\fR
3128 by omitting uninteresting hunks whose contents in the parents have only two variants and the merge result picks one of them without modification\&.
3133 Remerge two\-parent merge commits to create a temporary tree object\(empotentially containing files with conflict markers and such\&. A diff is then shown between that temporary tree and the actual merge commit\&.
3135 The output emitted when this option is used is subject to change, and so is its interaction with other options (unless explicitly documented)\&.
3139 \-\-combined\-all\-paths
3141 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
3142 \fB\-\-diff\-merges=[dense\-]combined\fR
3143 is in use, and is likely only useful if filename changes are detected (i\&.e\&. when either rename or copy detection have been requested)\&.
3146 \-U<n>, \-\-unified=<n>
3148 Generate diffs with <n> lines of context instead of the usual three\&. Implies
3154 Output to a specific file instead of stdout\&.
3157 \-\-output\-indicator\-new=<char>, \-\-output\-indicator\-old=<char>, \-\-output\-indicator\-context=<char>
3159 Specify the character used to indicate new, old or context lines in the generated patch\&. Normally they are
3162 and \*(Aq \*(Aq respectively\&.
3167 For each commit, show a summary of changes using the raw diff format\&. See the "RAW OUTPUT FORMAT" section of
3168 \fBgit-diff\fR(1)\&. This is different from showing the log itself in raw format, which you can achieve with
3169 \fB\-\-format=raw\fR\&.
3172 \-\-patch\-with\-raw
3175 \fB\-p \-\-raw\fR\&.
3180 Show the tree objects in the diff output\&.
3183 \-\-indent\-heuristic
3185 Enable the heuristic that shifts diff hunk boundaries to make patches easier to read\&. This is the default\&.
3188 \-\-no\-indent\-heuristic
3190 Disable the indent heuristic\&.
3195 Spend extra time to make sure the smallest possible diff is produced\&.
3200 Generate a diff using the "patience diff" algorithm\&.
3205 Generate a diff using the "histogram diff" algorithm\&.
3210 Generate a diff using the "anchored diff" algorithm\&.
3212 This option may be specified more than once\&.
3214 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\&.
3217 \-\-diff\-algorithm={patience|minimal|histogram|myers}
3219 Choose a diff algorithm\&. The variants are as follows:
3221 \fBdefault\fR, \fBmyers\fR
3223 The basic greedy diff algorithm\&. Currently, this is the default\&.
3228 Spend extra time to make sure the smallest possible diff is produced\&.
3233 Use "patience diff" algorithm when generating patches\&.
3238 This algorithm extends the patience algorithm to "support low\-occurrence common elements"\&.
3241 For instance, if you configured the
3242 \fBdiff\&.algorithm\fR
3243 variable to a non\-default value and want to use the default one, then you have to use
3244 \fB\-\-diff\-algorithm=default\fR
3248 \-\-stat[=<width>[,<name\-width>[,<count>]]]
3250 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
3251 \fB<width>\fR\&. The width of the filename part can be limited by giving another width
3253 after a comma or by setting
3254 \fBdiff\&.statNameWidth=<width>\fR\&. The width of the graph part can be limited by using
3255 \fB\-\-stat\-graph\-width=<width>\fR
3257 \fBdiff\&.statGraphWidth=<width>\fR\&. Using
3260 \fB\-\-stat\-graph\-width\fR
3261 affects all commands generating a stat graph, while setting
3262 \fBdiff\&.statNameWidth\fR
3264 \fBdiff\&.statGraphWidth\fR
3266 \fBgit format\-patch\fR\&. By giving a third parameter
3267 \fB<count>\fR, you can limit the output to the first
3271 if there are more\&.
3273 These parameters can also be set individually with
3274 \fB\-\-stat\-width=<width>\fR,
3275 \fB\-\-stat\-name\-width=<name\-width>\fR
3277 \fB\-\-stat\-count=<count>\fR\&.
3280 \-\-compact\-summary
3282 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
3289 \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
3297 Output only the last line of the
3299 format containing total number of modified files, as well as number of added and deleted lines\&.
3302 \-X[<param1,param2,\&...>], \-\-dirstat[=<param1,param2,\&...>]
3304 Output the distribution of relative amount of changes for each sub\-directory\&. The behavior of
3306 can be customized by passing it a comma separated list of parameters\&. The defaults are controlled by the
3307 \fBdiff\&.dirstat\fR
3308 configuration variable (see
3309 \fBgit-config\fR(1))\&. The following parameters are available:
3313 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\&.
3318 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
3322 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
3329 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
3331 behavior, since it does not have to look at the file contents at all\&.
3336 Count changes in a child directory for the parent directory as well\&. Note that when using
3337 \fBcumulative\fR, the sum of the percentages reported may exceed 100%\&. The default (non\-cumulative) behavior can be specified with the
3344 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\&.
3347 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:
3348 \fB\-\-dirstat=files,10,cumulative\fR\&.
3353 Synonym for \-\-dirstat=cumulative
3356 \-\-dirstat\-by\-file[=<param1,param2>\&...]
3358 Synonym for \-\-dirstat=files,param1,param2\&...
3363 Output a condensed summary of extended header information such as creations, renames and mode changes\&.
3366 \-\-patch\-with\-stat
3369 \fB\-p \-\-stat\fR\&.
3374 Separate the commits with NULs instead of newlines\&.
3380 has been given, do not munge pathnames and use NULs as output field terminators\&.
3382 Without this option, pathnames with "unusual" characters are quoted as explained for the configuration variable
3383 \fBcore\&.quotePath\fR
3385 \fBgit-config\fR(1))\&.
3390 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
3397 Show only names and status of changed files\&. See the description of the
3398 \fB\-\-diff\-filter\fR
3399 option on what the status letters mean\&. Just like
3400 \fB\-\-name\-only\fR
3401 the file names are often encoded in UTF\-8\&.
3404 \-\-submodule[=<format>]
3406 Specify how differences in submodules are shown\&. When specifying
3407 \fB\-\-submodule=short\fR
3410 format is used\&. This format just shows the names of the commits at the beginning and end of the range\&. When
3413 \fB\-\-submodule=log\fR
3416 format is used\&. This format lists the commits in the range like
3417 \fBgit-submodule\fR(1)
3420 \fB\-\-submodule=diff\fR
3423 format is used\&. This format shows an inline diff of the changes in the submodule contents between the commit range\&. Defaults to
3424 \fBdiff\&.submodule\fR
3427 format if the config option is unset\&.
3432 Show colored diff\&.
3435 \fI=<when>\fR) is the same as
3436 \fB\-\-color=always\fR\&.
3446 Turn off colored diff\&. It is the same as
3447 \fB\-\-color=never\fR\&.
3450 \-\-color\-moved[=<mode>]
3452 Moved lines of code are colored differently\&. The <mode> defaults to
3454 if the option is not given and to
3456 if the option with no mode is given\&. The mode must be one of:
3460 Moved lines are not highlighted\&.
3466 \fBzebra\fR\&. This may change to a more sensible mode in the future\&.
3471 Any line that is added in one location and was removed in another location will be colored with
3472 \fIcolor\&.diff\&.newMoved\fR\&. Similarly
3473 \fIcolor\&.diff\&.oldMoved\fR
3474 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\&.
3479 Blocks of moved text of at least 20 alphanumeric characters are detected greedily\&. The detected blocks are painted using either the
3480 \fIcolor\&.diff\&.{old,new}Moved\fR
3481 color\&. Adjacent blocks cannot be told apart\&.
3486 Blocks of moved text are detected as in
3488 mode\&. The blocks are painted using either the
3489 \fIcolor\&.diff\&.{old,new}Moved\fR
3491 \fIcolor\&.diff\&.{old,new}MovedAlternative\fR\&. The change between the two colors indicates that a new block was detected\&.
3497 \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\&.
3499 is a deprecated synonym\&.
3503 \-\-no\-color\-moved
3505 Turn off move detection\&. This can be used to override configuration settings\&. It is the same as
3506 \fB\-\-color\-moved=no\fR\&.
3509 \-\-color\-moved\-ws=<modes>
3511 This configures how whitespace is ignored when performing the move detection for
3512 \fB\-\-color\-moved\fR\&. These modes can be given as a comma separated list:
3516 Do not ignore whitespace when performing move detection\&.
3519 ignore\-space\-at\-eol
3521 Ignore changes in whitespace at EOL\&.
3524 ignore\-space\-change
3526 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\&.
3531 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3534 allow\-indentation\-change
3536 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\&.
3540 \-\-no\-color\-moved\-ws
3542 Do not ignore whitespace when performing move detection\&. This can be used to override configuration settings\&. It is the same as
3543 \fB\-\-color\-moved\-ws=no\fR\&.
3546 \-\-word\-diff[=<mode>]
3548 Show a word diff, using the <mode> to delimit changed words\&. By default, words are delimited by whitespace; see
3549 \fB\-\-word\-diff\-regex\fR
3550 below\&. The <mode> defaults to
3551 \fIplain\fR, and must be one of:
3555 Highlight changed words using only colors\&. Implies
3564 \fB{+added+}\fR\&. Makes no attempts to escape the delimiters if they appear in the input, so the output may be ambiguous\&.
3569 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
3570 \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
3572 on a line of its own\&.
3577 Disable word diff again\&.
3580 Note that despite the name of the first mode, color is used to highlight the changed parts in all modes if enabled\&.
3583 \-\-word\-diff\-regex=<regex>
3585 Use <regex> to decide what a word is, instead of considering runs of non\-whitespace to be a word\&. Also implies
3586 \fB\-\-word\-diff\fR
3587 unless it was already enabled\&.
3589 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
3591 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\&.
3594 \fB\-\-word\-diff\-regex=\&.\fR
3595 will treat each character as a word and, correspondingly, show differences character by character\&.
3597 The regex can also be set via a diff driver or configuration option, see
3598 \fBgitattributes\fR(5)
3600 \fBgit-config\fR(1)\&. Giving it explicitly overrides any diff driver or configuration setting\&. Diff drivers override configuration settings\&.
3603 \-\-color\-words[=<regex>]
3606 \fB\-\-word\-diff=color\fR
3607 plus (if a regex was specified)
3608 \fB\-\-word\-diff\-regex=<regex>\fR\&.
3613 Turn off rename detection, even when the configuration file gives the default to do so\&.
3616 \-\-[no\-]rename\-empty
3618 Whether to use empty blobs as rename source\&.
3623 Warn if changes introduce conflict markers or whitespace errors\&. What are considered whitespace errors is controlled by
3624 \fBcore\&.whitespace\fR
3625 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\&.
3628 \-\-ws\-error\-highlight=<kind>
3630 Highlight whitespace errors in the
3635 lines of the diff\&. Multiple values are separated by comma,
3637 resets previous values,
3644 \fBold,new,context\fR\&. When this option is not given, and the configuration variable
3645 \fBdiff\&.wsErrorHighlight\fR
3646 is not set, only whitespace errors in
3648 lines are highlighted\&. The whitespace errors are colored with
3649 \fBcolor\&.diff\&.whitespace\fR\&.
3654 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\&.
3660 \fB\-\-full\-index\fR, output a binary diff that can be applied with
3661 \fBgit\-apply\fR\&. Implies
3667 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
3669 hexdigits long that uniquely refers the object\&. In diff\-patch output format,
3670 \fB\-\-full\-index\fR
3671 takes higher precedence, i\&.e\&. if
3672 \fB\-\-full\-index\fR
3673 is specified, full blob names will be shown regardless of
3674 \fB\-\-abbrev\fR\&. Non default number of digits can be specified with
3675 \fB\-\-abbrev=<n>\fR\&.
3678 \-B[<n>][/<m>], \-\-break\-rewrites[=[<n>][/<m>]]
3680 Break complete rewrite changes into pairs of delete and create\&. This serves two purposes:
3682 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
3684 controls this aspect of the \-B option (defaults to 60%)\&.
3686 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)\&.
3688 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
3690 controls this aspect of the \-B option (defaults to 50%)\&.
3692 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\&.
3695 \-M[<n>], \-\-find\-renames[=<n>]
3697 If generating diffs, detect and report renames for each commit\&. For following files across renames while traversing history, see
3698 \fB\-\-follow\fR\&. If
3700 is specified, it is a threshold on the similarity index (i\&.e\&. amount of addition/deletions compared to the file\(cqs size)\&. For example,
3702 means Git should consider a delete/add pair to be a rename if more than 90% of the file hasn\(cqt changed\&. Without a
3704 sign, the number is to be read as a fraction, with a decimal point before it\&. I\&.e\&.,
3706 becomes 0\&.5, and is thus the same as
3707 \fB\-M50%\fR\&. Similarly,
3710 \fB\-M5%\fR\&. To limit detection to exact renames, use
3711 \fB\-M100%\fR\&. The default similarity index is 50%\&.
3714 \-C[<n>], \-\-find\-copies[=<n>]
3716 Detect copies as well as renames\&. See also
3717 \fB\-\-find\-copies\-harder\fR\&. If
3719 is specified, it has the same meaning as for
3723 \-\-find\-copies\-harder
3725 For performance reasons, by default,
3727 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
3729 option has the same effect\&.
3732 \-D, \-\-irreversible\-delete
3734 Omit the preimage for deletes, i\&.e\&. print only the header but not the diff between the preimage and
3735 \fB/dev/null\fR\&. The resulting patch is not meant to be applied with
3738 \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\&.
3740 When used together with
3741 \fB\-B\fR, omit also the preimage in the deletion part of a delete/create pair\&.
3750 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\&.
3753 \-\-diff\-filter=[(A|C|D|M|R|T|U|X|B)\&...[*]]
3755 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
3757 (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\&.
3759 Also, these upper\-case letters can be downcased to exclude\&. E\&.g\&.
3760 \fB\-\-diff\-filter=ad\fR
3761 excludes added and deleted paths\&.
3763 Note that not all diffs can feature all types\&. For instance, copied and renamed entries cannot appear if detection for those types is disabled\&.
3768 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\&.
3770 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
3771 \fB\-S\fR, and keep going until you get the very first version of the block\&.
3773 Binary files are searched as well\&.
3778 Look for differences whose patch text contains added/removed lines that match <regex>\&.
3780 To illustrate the difference between
3781 \fB\-S<regex> \-\-pickaxe\-regex\fR
3783 \fB\-G<regex>\fR, consider a commit with the following diff in the same file:
3789 + return frotz(nitfol, two\->ptr, 1, 0);
3791 \- hit = frotz(nitfol, mf2\&.ptr, 1, 0);
3798 \fBgit log \-G"frotz\e(nitfol"\fR
3799 will show this commit,
3800 \fBgit log \-S"frotz\e(nitfol" \-\-pickaxe\-regex\fR
3801 will not (because the number of occurrences of that string did not change)\&.
3805 is supplied patches of binary files without a textconv filter will be ignored\&.
3810 \fBgitdiffcore\fR(7)
3811 for more information\&.
3814 \-\-find\-object=<object\-id>
3816 Look for differences that change the number of occurrences of the specified object\&. Similar to
3817 \fB\-S\fR, just the argument is different in that it doesn\(cqt search for a specific string but for a specific object id\&.
3819 The object can be a blob or a submodule commit\&. It implies the
3823 to also find trees\&.
3832 finds a change, show all the changes in that changeset, not just the files that contain the change in <string>\&.
3837 Treat the <string> given to
3839 as an extended POSIX regular expression to match\&.
3844 Control the order in which files appear in the output\&. This overrides the
3845 \fBdiff\&.orderFile\fR
3846 configuration variable (see
3847 \fBgit-config\fR(1))\&. To cancel
3848 \fBdiff\&.orderFile\fR, use
3849 \fB\-O/dev/null\fR\&.
3851 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\&.
3853 <orderfile> is parsed as follows:
3857 \h'-04'\(bu\h'+03'\c
3863 Blank lines are ignored, so they can be used as separators for readability\&.
3868 \h'-04'\(bu\h'+03'\c
3874 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\&.
3879 \h'-04'\(bu\h'+03'\c
3885 Each other line contains a single pattern\&.
3888 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"\&.
3891 \-\-skip\-to=<file>, \-\-rotate\-to=<file>
3893 Discard the files before the named <file> from the output (i\&.e\&.
3894 \fIskip to\fR), or move them to the end of the output (i\&.e\&.
3895 \fIrotate to\fR)\&. These options were invented primarily for the use of the
3897 command, and may not be very useful otherwise\&.
3902 Swap two inputs; that is, show differences from index or on\-disk file to tree contents\&.
3905 \-\-relative[=<path>], \-\-no\-relative
3907 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\&.
3908 \fB\-\-no\-relative\fR
3909 can be used to countermand both
3910 \fBdiff\&.relative\fR
3911 config option and previous
3912 \fB\-\-relative\fR\&.
3917 Treat all files as text\&.
3920 \-\-ignore\-cr\-at\-eol
3922 Ignore carriage\-return at the end of line when doing a comparison\&.
3925 \-\-ignore\-space\-at\-eol
3927 Ignore changes in whitespace at EOL\&.
3930 \-b, \-\-ignore\-space\-change
3932 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\&.
3935 \-w, \-\-ignore\-all\-space
3937 Ignore whitespace when comparing lines\&. This ignores differences even if one line has whitespace where the other line has none\&.
3940 \-\-ignore\-blank\-lines
3942 Ignore changes whose lines are all blank\&.
3945 \-I<regex>, \-\-ignore\-matching\-lines=<regex>
3947 Ignore changes whose all lines match <regex>\&. This option may be specified more than once\&.
3950 \-\-inter\-hunk\-context=<lines>
3952 Show the context between diff hunks, up to the specified number of lines, thereby fusing hunks that are close to each other\&. Defaults to
3953 \fBdiff\&.interHunkContext\fR
3954 or 0 if the config option is unset\&.
3957 \-W, \-\-function\-context
3959 Show whole function as context lines for each change\&. The function names are determined in the same way as
3961 works out patch hunk headers (see
3962 \fIDefining a custom hunk\-header\fR
3964 \fBgitattributes\fR(5))\&.
3969 Allow an external diff helper to be executed\&. If you set an external diff driver with
3970 \fBgitattributes\fR(5), you need to use this option with
3977 Disallow external diff drivers\&.
3980 \-\-textconv, \-\-no\-textconv
3982 Allow (or disallow) external text conversion filters to be run when comparing binary files\&. See
3983 \fBgitattributes\fR(5)
3984 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
3987 \fBgit-log\fR(1), but not for
3988 \fBgit-format-patch\fR(1)
3989 or diff plumbing commands\&.
3992 \-\-ignore\-submodules[=<when>]
3994 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
3999 \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\&.
4002 \-\-src\-prefix=<prefix>
4004 Show the given source prefix instead of "a/"\&.
4007 \-\-dst\-prefix=<prefix>
4009 Show the given destination prefix instead of "b/"\&.
4014 Do not show any source or destination prefix\&.
4019 Use the default source and destination prefixes ("a/" and "b/")\&. This is usually the default already, but may be used to override config such as
4020 \fBdiff\&.noprefix\fR\&.
4023 \-\-line\-prefix=<prefix>
4025 Prepend an additional prefix to every line of output\&.
4028 \-\-ita\-invisible\-in\-index
4030 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
4031 \fB\-\-ita\-visible\-in\-index\fR\&. Both options are experimental and could be removed in future\&.
4034 For more detailed explanation on these common options, see also \fBgitdiffcore\fR(7)\&.
4035 .SH "GENERATING PATCH TEXT WITH \-P"
4037 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))\&.
4039 What the \-p option produces is slightly different from the traditional diff format:
4049 It is preceded by a "git diff" header that looks like this:
4055 diff \-\-git a/file1 b/file2
4065 filenames are the same unless rename/copy is involved\&. Especially, even for a creation or a deletion,
4069 used in place of the
4075 When a rename/copy is involved,
4079 show the name of the source file of the rename/copy and the name of the file that the rename/copy produces, respectively\&.
4090 It is followed by one or more extended header lines:
4098 deleted file mode <mode>
4099 new file mode <mode>
4104 similarity index <number>
4105 dissimilarity index <number>
4106 index <hash>\&.\&.<hash> <mode>
4112 File modes are printed as 6\-digit octal numbers including the file type and file permission bits\&.
4114 Path names in extended headers do not include the
4120 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\&.
4122 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\&.
4133 Pathnames with "unusual" characters are quoted as explained for the configuration variable
4134 \fBcore\&.quotePath\fR
4136 \fBgit-config\fR(1))\&.
4149 files in the output refer to files before the commit, and all the
4151 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:
4157 diff \-\-git a/a b/b
4160 diff \-\-git a/b b/a
4177 Hunk headers mention the name of the function to which the hunk applies\&. See "Defining a custom hunk\-header" in
4178 \fBgitattributes\fR(5)
4179 for details of how to tailor this to specific languages\&.
4181 .SH "COMBINED DIFF FORMAT"
4183 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 a specific format\&.
4185 A "combined diff" format looks like this:
4191 diff \-\-combined describe\&.c
4192 index fabadb8,cc95eb0\&.\&.4866510
4193 \-\-\- a/describe\&.c
4195 @@@ \-98,20 \-98,12 +98,20 @@@
4196 return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
4199 \- static void describe(char *arg)
4200 \-static void describe(struct commit *cmit, int last_one)
4201 ++static void describe(char *arg, int last_one)
4203 + unsigned char sha1[20];
4204 + struct commit *cmit;
4205 struct commit_list *list;
4206 static int initialized = 0;
4207 struct commit_name *n;
4209 + if (get_sha1(arg, sha1) < 0)
4210 + usage(describe_usage);
4211 + cmit = lookup_commit_reference(sha1);
4213 + usage(describe_usage);
4217 for_each_ref(get_name);
4233 It is preceded by a "git diff" header, that looks like this (when the
4241 diff \-\-combined file
4247 or like this (when the
4270 It is followed by one or more extended header lines (this example shows a merge with two parents):
4276 index <hash>,<hash>\&.\&.<hash>
4277 mode <mode>,<mode>\&.\&.<mode>
4278 new file mode <mode>
4279 deleted file mode <mode>,<mode>
4286 \fBmode <mode>,<mode>\&.\&.<mode>\fR
4287 line appears only if at least one of the <mode> is different from the rest\&. Extended headers with information about detected content movement (renames and copying detection) are designed to work with the diff of two <tree\-ish> and are not used by combined diff format\&.
4298 It is followed by a two\-line from\-file/to\-file header:
4311 Similar to the two\-line header for the traditional
4315 is used to signal created or deleted files\&.
4317 However, if the \-\-combined\-all\-paths option is provided, instead of a two\-line from\-file/to\-file, you get an N+1 line from\-file/to\-file header, where N is the number of parents in the merge commit:
4332 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\&.
4343 Chunk header format is modified to prevent people from accidentally feeding it to
4344 \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
4352 @@@ <from\-file\-range> <from\-file\-range> <to\-file\-range> @@@
4358 There are (number of parents + 1)
4360 characters in the chunk header for combined diff format\&.
4363 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\&.
4365 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)\&.
4367 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)\&.
4369 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")\&.
4372 \fBgit log \-\-no\-merges\fR
4374 Show the whole commit history, but skip any merges
4377 \fBgit log v2\&.6\&.12\&.\&. include/scsi drivers/scsi\fR
4379 Show all commits since version
4381 that changed any file in the
4388 \fBgit log \-\-since="2 weeks ago" \-\- gitk\fR
4390 Show the changes during the last two weeks to the file
4393 is necessary to avoid confusion with the
4399 \fBgit log \-\-name\-status release\&.\&.test\fR
4401 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\&.
4404 \fBgit log \-\-follow builtin/rev\-list\&.c\fR
4406 Shows the commits that changed
4407 \fBbuiltin/rev\-list\&.c\fR, including those commits that occurred before the file was given its present name\&.
4410 \fBgit log \-\-branches \-\-not \-\-remotes=origin\fR
4412 Shows all commits that are in any of local branches but not in any of remote\-tracking branches for
4414 (what you have that origin doesn\(cqt)\&.
4417 \fBgit log master \-\-not \-\-remotes=*/master\fR
4419 Shows all commits that are in local master but not in any remote repository master branches\&.
4422 \fBgit log \-p \-m \-\-first\-parent\fR
4424 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\&.
4427 \fBgit log \-L \*(Aq/int main/\*(Aq,/^}/:main\&.c\fR
4429 Shows how the function
4433 evolved over time\&.
4438 Limits the number of commits to show to 3\&.
4442 Git is to some extent character encoding agnostic\&.
4446 \h'-04'\(bu\h'+03'\c
4452 The contents of the blob objects are uninterpreted sequences of bytes\&. There is no encoding translation at the core level\&.
4457 \h'-04'\(bu\h'+03'\c
4463 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
4465 \fBgit-config\fR(1)),
4467 \fBgitattributes\fR(5)
4469 \fBgitmodules\fR(5))\&.
4471 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\&.
4476 \h'-04'\(bu\h'+03'\c
4482 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
4484 UTF\-16/32, EBCDIC and CJK multi\-byte encodings (GBK, Shift\-JIS, Big5, EUC\-x, CP9xx etc\&.)\&.
4487 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\&.
4499 \fIgit commit\-tree\fR
4500 issue 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
4501 \fBi18n\&.commitEncoding\fR
4511 commitEncoding = ISO\-8859\-1
4517 Commit objects created with the above setting record the value of
4518 \fBi18n\&.commitEncoding\fR
4521 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\&.
4535 and friends look at the
4537 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
4538 \fBi18n\&.logOutputEncoding\fR
4548 logOutputEncoding = ISO\-8859\-1
4554 If you do not have this configuration variable, the value of
4555 \fBi18n\&.commitEncoding\fR
4559 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\&.
4562 See \fBgit-config\fR(1) for core variables and \fBgit-diff\fR(1) for settings related to diff generation\&.
4569 \fIPretty Formats\fR
4570 above\&.) Defaults to
4574 i18n\&.logOutputEncoding
4576 Encoding to use when displaying logs\&. (See
4578 above\&.) Defaults to the value of
4579 \fBi18n\&.commitEncoding\fR
4580 if set, and UTF\-8 otherwise\&.
4583 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:
4589 \fBgit-show\fR(1), and
4590 \fBgit-whatchanged\fR(1)
4592 \fB\-\-abbrev\-commit\fR\&. You may override this option with
4593 \fB\-\-no\-abbrev\-commit\fR\&.
4598 Set the default date\-time mode for the
4600 command\&. Setting a value for log\&.date is similar to using
4607 If the format is set to "auto:foo" and the pager is in use, format "foo" will be used for the date format\&. Otherwise, "default" will be used\&.
4612 Print out the ref names of any commits that are shown by the log command\&. If
4614 is specified, the ref name prefixes
4619 will not be printed\&. If
4621 is specified, the full ref name (including prefix) will be printed\&. If
4623 is specified, then if the output is going to a terminal, the ref names are shown as if
4625 were given, otherwise no ref names are shown\&. This is the same as the
4631 log\&.initialDecorationSet
4635 only shows decorations for certain known ref namespaces\&. If
4637 is specified, then show all refs as decorations\&.
4640 log\&.excludeDecoration
4642 Exclude the specified patterns from the log decorations\&. This is similar to the
4643 \fB\-\-decorate\-refs\-exclude\fR
4644 command\-line option, but the config option can be overridden by the
4645 \fB\-\-decorate\-refs\fR
4651 Set diff format to be used when
4652 \fB\-\-diff\-merges=on\fR
4654 \fB\-\-diff\-merges\fR
4657 for details\&. Defaults to
4668 option was used when a single <path> is given\&. This has the same limitations as
4669 \fB\-\-follow\fR, i\&.e\&. it cannot be used to follow multiple files and does not work well on non\-linear history\&.
4674 A list of colors, separated by commas, that can be used to draw history lines in
4675 \fBgit log \-\-graph\fR\&.
4680 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
4683 \fBgit-whatchanged\fR(1), which normally hide the root commit will now show it\&. True by default\&.
4690 \fBgit-show\fR(1), and
4691 \fBgit-whatchanged\fR(1)
4693 \fB\-\-show\-signature\fR\&.
4700 \fBgit-show\fR(1), and
4701 \fBgit-whatchanged\fR(1)
4703 \fB\-\-use\-mailmap\fR, otherwise assume
4704 \fB\-\-no\-use\-mailmap\fR\&. True by default\&.
4707 notes\&.mergeStrategy
4709 Which merge strategy to choose by default when resolving notes conflicts\&. Must be one of
4714 \fBcat_sort_uniq\fR\&. Defaults to
4715 \fBmanual\fR\&. See the "NOTES MERGE STRATEGIES" section of
4717 for more information on each strategy\&.
4719 This setting can be overridden by passing the
4722 \fBgit-notes\fR(1)\&.
4725 notes\&.<name>\&.mergeStrategy
4727 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
4729 for more information on the available strategies\&.
4734 Which ref (or refs, if a glob or specified more than once), in addition to the default set by
4735 \fBcore\&.notesRef\fR
4737 \fBGIT_NOTES_REF\fR, to read notes from when showing commit messages with the
4739 family of commands\&.
4741 This setting can be overridden with the
4742 \fBGIT_NOTES_DISPLAY_REF\fR
4743 environment variable, which must be a colon separated list of refs or globs\&.
4745 A warning will be issued for refs that do not exist, but a glob that does not match any refs is silently ignored\&.
4747 This setting can be disabled by the
4751 family of commands, or by the
4752 \fB\-\-notes=<ref>\fR
4753 option accepted by those commands\&.
4755 The effective value of "core\&.notesRef" (possibly overridden by GIT_NOTES_REF) is also implicitly added to the list of refs to be displayed\&.
4758 notes\&.rewrite\&.<command>
4760 When rewriting commits with <command> (currently
4763 \fBrebase\fR), if this variable is
4764 \fBfalse\fR, git will not copy notes from the original to the rewritten commit\&. Defaults to
4765 \fBtrue\fR\&. See also "\fBnotes\&.rewriteRef\fR" below\&.
4767 This setting can be overridden with the
4768 \fBGIT_NOTES_REWRITE_REF\fR
4769 environment variable, which must be a colon separated list of refs or globs\&.
4774 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
4777 \fBcat_sort_uniq\fR, or
4778 \fBignore\fR\&. Defaults to
4779 \fBconcatenate\fR\&.
4781 This setting can be overridden with the
4782 \fBGIT_NOTES_REWRITE_MODE\fR
4783 environment variable\&.
4788 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\&.
4790 Does not have a default value; you must configure this variable to enable note rewriting\&. Set it to
4791 \fBrefs/notes/commits\fR
4792 to enable rewriting for the default commit notes\&.
4794 Can be overridden with the
4795 \fBGIT_NOTES_REWRITE_REF\fR
4796 environment variable\&. See
4797 \fBnotes\&.rewrite\&.<command>\fR
4798 above for a further description of its format\&.
4802 Part of the \fBgit\fR(1) suite