2 .\" Title: git-shortlog
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.36.1.153.gf9b95943b6
10 .TH "GIT\-SHORTLOG" "1" "05/20/2022" "Git 2\&.36\&.1\&.153\&.gf9b959" "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-shortlog \- Summarize \(aqgit log\(aq output
35 \fIgit shortlog\fR [<options>] [<revision\-range>] [[\-\-] <path>\&...]
36 git log \-\-pretty=short | \fIgit shortlog\fR [<options>]
41 Summarizes \fIgit log\fR output in a format suitable for inclusion in release announcements\&. Each commit will be grouped by author and title\&.
43 Additionally, "[PATCH]" will be stripped from the commit description\&.
45 If no revisions are passed on the command line and either standard input is not a terminal or there is no current branch, \fIgit shortlog\fR will output a summary of the log read from standard input, without reference to the current repository\&.
50 Sort output according to the number of commits per author instead of author alphabetic order\&.
55 Suppress commit description and provide a commit count summary only\&.
60 Show the email address of each author\&.
65 Instead of the commit subject, use some other information to describe each commit\&.
67 can be any string accepted by the
70 \fIgit log\fR, such as
71 \fI* [%h] %s\fR\&. (See the "PRETTY FORMATS" section of
78 Each pretty\-printed commit will be rewrapped before it is shown\&.
87 Group commits based on
90 option is specified, the default is
103 \fBauthor\fR, commits are grouped by author
114 \fBcommitter\fR, commits are grouped by committer (the same as
126 \fBtrailer:<field>\fR, the
128 is interpreted as a case\-insensitive commit message trailer (see
129 \fBgit-interpret-trailers\fR(1))\&. For example, if your project uses
131 trailers, you might want to see who has been reviewing with
132 \fBgit shortlog \-ns \-\-group=trailer:reviewed\-by\fR\&.
134 Note that commits that do not include the trailer will not be counted\&. Likewise, commits with multiple trailers (e\&.g\&., multiple signoffs) may be counted more than once (but only once per unique trailer value in that commit)\&.
136 Shortlog will attempt to parse each trailer value as a
138 identity\&. If successful, the mailmap is applied and the email is omitted unless the
140 option is specified\&. If the value cannot be parsed as an identity, it will be taken literally and completely\&.
145 is specified multiple times, commits are counted under each value (but again, only once per unique value in that commit)\&. For example,
146 \fBgit shortlog \-\-group=author \-\-group=trailer:co\-authored\-by\fR
147 counts both authors and co\-authors\&.
153 \fB\-\-group=committer\fR\&.
156 \-w[<width>[,<indent1>[,<indent2>]]]
158 Linewrap the output by wrapping each line at
159 \fBwidth\fR\&. The first line of each entry is indented by
161 spaces, and the second and subsequent lines are indented by
167 default to 76, 6 and 9 respectively\&.
171 (zero) then indent the lines of the output without wrapping them\&.
176 Show only commits in the specified revision range\&. When no <revision\-range> is specified, it defaults to
178 (i\&.e\&. the whole history leading to the current commit)\&.
179 \fBorigin\&.\&.HEAD\fR
180 specifies all the commits reachable from the current commit (i\&.e\&.
181 \fBHEAD\fR), but not from
182 \fBorigin\fR\&. For a complete list of ways to spell <revision\-range>, see the "Specifying Ranges" section of
183 \fBgitrevisions\fR(7)\&.
188 Consider only commits that are enough to explain how the files that match the specified paths came to be\&.
190 Paths may need to be prefixed with
192 to separate them from options or the revision range, when confusion arises\&.
194 .SS "Commit Limiting"
196 Besides specifying a range of commits that should be listed using the special notations explained in the description, additional commit limiting may be applied\&.
198 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\&.
200 Note that these are applied before commit ordering and formatting options, such as \fB\-\-reverse\fR\&.
202 \-<number>, \-n <number>, \-\-max\-count=<number>
204 Limit the number of commits to output\&.
211 commits before starting to show the commit output\&.
214 \-\-since=<date>, \-\-after=<date>
216 Show commits more recent than a specific date\&.
219 \-\-since\-as\-filter=<date>
221 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\&.
224 \-\-until=<date>, \-\-before=<date>
226 Show commits older than a specific date\&.
229 \-\-author=<pattern>, \-\-committer=<pattern>
231 Limit the commits output to ones with author/committer header lines that match the specified pattern (regular expression)\&. With more than one
232 \fB\-\-author=<pattern>\fR, commits whose author matches any of the given patterns are chosen (similarly for multiple
233 \fB\-\-committer=<pattern>\fR)\&.
236 \-\-grep\-reflog=<pattern>
238 Limit the commits output to ones with reflog entries that match the specified pattern (regular expression)\&. With more than one
239 \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
240 \fB\-\-walk\-reflogs\fR
246 Limit the commits output to ones with log message that matches the specified pattern (regular expression)\&. With more than one
247 \fB\-\-grep=<pattern>\fR, commits whose message matches any of the given patterns are chosen (but see
248 \fB\-\-all\-match\fR)\&.
252 is in effect, the message from the notes is matched as if it were part of the log message\&.
257 Limit the commits output to ones that match all given
258 \fB\-\-grep\fR, instead of ones that match at least one\&.
263 Limit the commits output to ones with log message that do not match the pattern specified with
264 \fB\-\-grep=<pattern>\fR\&.
267 \-i, \-\-regexp\-ignore\-case
269 Match the regular expression limiting patterns without regard to letter case\&.
274 Consider the limiting patterns to be basic regular expressions; this is the default\&.
277 \-E, \-\-extended\-regexp
279 Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions\&.
282 \-F, \-\-fixed\-strings
284 Consider the limiting patterns to be fixed strings (don\(cqt interpret pattern as a regular expression)\&.
287 \-P, \-\-perl\-regexp
289 Consider the limiting patterns to be Perl\-compatible regular expressions\&.
291 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\&.
296 Stop when a given path disappears from the tree\&.
301 Print only merge commits\&. This is exactly the same as
302 \fB\-\-min\-parents=2\fR\&.
307 Do not print commits with more than one parent\&. This is exactly the same as
308 \fB\-\-max\-parents=1\fR\&.
311 \-\-min\-parents=<number>, \-\-max\-parents=<number>, \-\-no\-min\-parents, \-\-no\-max\-parents
313 Show only commits which have at least (or at most) that many parent commits\&. In particular,
314 \fB\-\-max\-parents=1\fR
316 \fB\-\-no\-merges\fR,
317 \fB\-\-min\-parents=2\fR
320 \fB\-\-max\-parents=0\fR
321 gives all root commits and
322 \fB\-\-min\-parents=3\fR
323 all octopus merges\&.
325 \fB\-\-no\-min\-parents\fR
327 \fB\-\-no\-max\-parents\fR
328 reset these limits (to no limit) again\&. Equivalent forms are
329 \fB\-\-min\-parents=0\fR
330 (any commit has 0 or more parents) and
331 \fB\-\-max\-parents=\-1\fR
332 (negative numbers denote no upper limit)\&.
337 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\&.
340 \-\-exclude\-first\-parent\-only
342 When finding commits to exclude (with a
343 \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\&.
348 Reverses the meaning of the
350 prefix (or lack thereof) for all following revision specifiers, up to the next
356 Pretend as if all the refs in
357 \fBrefs/\fR, along with
358 \fBHEAD\fR, are listed on the command line as
362 \-\-branches[=<pattern>]
364 Pretend as if all the refs in
366 are listed on the command line as
369 is given, limit branches to ones matching given shell glob\&. If pattern lacks
374 at the end is implied\&.
379 Pretend as if all the refs in
381 are listed on the command line as
384 is given, limit tags to ones matching given shell glob\&. If pattern lacks
389 at the end is implied\&.
392 \-\-remotes[=<pattern>]
394 Pretend as if all the refs in
396 are listed on the command line as
399 is given, limit remote\-tracking branches to ones matching given shell glob\&. If pattern lacks
404 at the end is implied\&.
407 \-\-glob=<glob\-pattern>
409 Pretend as if all the refs matching shell glob
410 \fI<glob\-pattern>\fR
411 are listed on the command line as
412 \fI<commit>\fR\&. Leading
413 \fIrefs/\fR, is automatically prepended if missing\&. If pattern lacks
418 at the end is implied\&.
421 \-\-exclude=<glob\-pattern>
423 Do not include refs matching
424 \fI<glob\-pattern>\fR
429 \fB\-\-remotes\fR, or
431 would otherwise consider\&. Repetitions of this option accumulate exclusion patterns up to the next
435 \fB\-\-remotes\fR, or
437 option (other options or arguments do not clear accumulated patterns)\&.
439 The patterns given should not begin with
446 \fB\-\-remotes\fR, respectively, and they must begin with
451 \fB\-\-all\fR\&. If a trailing
453 is intended, it must be given explicitly\&.
458 Pretend as if all objects mentioned by reflogs are listed on the command line as
464 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
465 \fBobjects/info/alternates\fR\&. The set of included objects may be modified by
466 \fBcore\&.alternateRefsCommand\fR, etc\&. See
467 \fBgit-config\fR(1)\&.
472 By default, all working trees will be examined by the following options when there are more than one (see
473 \fBgit-worktree\fR(1)):
477 \fB\-\-indexed\-objects\fR\&. This option forces them to examine the current working tree only\&.
482 Upon seeing an invalid object name in the input, pretend as if the bad input was not given\&.
487 Pretend as if the bad bisection ref
488 \fBrefs/bisect/bad\fR
489 was listed and as if it was followed by
491 and the good bisection refs
492 \fBrefs/bisect/good\-*\fR
493 on the command line\&.
500 listed on the command line, read them from the standard input\&. If a
502 separator is seen, stop reading commits and start reading paths to limit the result\&.
508 \fB\-\-cherry\-pick\fR
509 (see below) but mark equivalent commits with
511 rather than omitting them, and inequivalent ones with
517 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\&.
519 For example, if you have two branches,
522 \fBB\fR, a usual way to list all commits on only one side of them is with
523 \fB\-\-left\-right\fR
524 (see the example below in the description of the
525 \fB\-\-left\-right\fR
526 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\&.
529 \-\-left\-only, \-\-right\-only
531 List only commits on the respective side of a symmetric difference, i\&.e\&. only those which would be marked
536 \fB\-\-left\-right\fR\&.
539 \fB\-\-cherry\-pick \-\-right\-only A\&.\&.\&.B\fR
540 omits those commits from
544 or are patch\-equivalent to a commit in
545 \fBA\fR\&. In other words, this lists the
548 \fBgit cherry A B\fR\&. More precisely,
549 \fB\-\-cherry\-pick \-\-right\-only \-\-no\-merges\fR
550 gives the exact list\&.
556 \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
557 \fBgit log \-\-cherry upstream\&.\&.\&.mybranch\fR, similar to
558 \fBgit cherry upstream mybranch\fR\&.
561 \-g, \-\-walk\-reflogs
563 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,
565 \fIcommit1\&.\&.commit2\fR, and
566 \fIcommit1\&.\&.\&.commit2\fR
567 notations cannot be used)\&.
575 (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
579 is the reverse\-chronological index in the reflog) or as
580 \fBref@{timestamp}\fR
581 (with the timestamp for that entry), depending on a few rules:
591 If the starting point is specified as
592 \fBref@{Nth}\fR, show the index format\&.
603 If the starting point was specified as
604 \fBref@{now}\fR, show the timestamp format\&.
615 If neither was used, but
617 was given on the command line, show the timestamp in the format requested by
629 Otherwise, show the index format\&.
633 \fB\-\-pretty=oneline\fR, the commit message is prefixed with this information on the same line\&. This option cannot be combined with
634 \fB\-\-reverse\fR\&. See also
635 \fBgit-reflog\fR(1)\&.
638 \fB\-\-pretty=reference\fR, this information will not be shown at all\&.
643 After a failed merge, show refs that touch files having a conflict and don\(cqt exist on all heads to merge\&.
648 Output excluded boundary commits\&. Boundary commits are prefixed with
651 .SS "History Simplification"
653 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\&.
655 The following options select the commits to be shown:
659 Commits modifying the given <paths> are selected\&.
662 \-\-simplify\-by\-decoration
664 Commits that are referred by some branch or tag are selected\&.
667 Note that extra commits can be shown to give a meaningful history\&.
669 The following options affect the way the simplification is performed:
673 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)
678 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\&.
683 Same as the default mode, but does not prune some history\&.
688 Only the selected commits are shown, plus some to have a meaningful history\&.
693 All commits in the simplified history are shown\&.
699 \fB\-\-full\-history\fR
700 to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge\&.
705 When given a range of commits to display (e\&.g\&.
706 \fIcommit1\&.\&.commit2\fR
708 \fIcommit2 ^commit1\fR), only display commits that exist directly on the ancestry chain between the
711 \fIcommit2\fR, i\&.e\&. commits that are both descendants of
712 \fIcommit1\fR, and ancestors of
716 A more detailed explanation follows\&.
718 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\&.)
720 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:
726 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
730 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq X
737 The horizontal line of history A\-\-\-Q is taken to be the first parent of each merge\&. The commits are:
748 is the initial commit, in which
750 exists with contents \(lqasdf\(rq, and a file
752 exists with contents \(lqquux\(rq\&. Initial commits are compared to an empty tree, so
768 contains just \(lqfoo\(rq\&.
780 contains the same change as
783 is trivial and hence TREESAME to all parents\&.
796 \fBfoo\fR, but its merge
798 changes it to \(lqfoobar\(rq, so it is not TREESAME to any parent\&.
812 to \(lqbaz\(rq\&. Its merge
814 combines the strings from
818 to \(lqfoobarbaz\(rq; i\&.e\&., it is not TREESAME to any parent\&.
832 to \(lqxyzzy\(rq, and its merge
834 combines the strings to \(lqquux xyzzy\(rq\&.
850 is an independent root commit that added a new file
868 \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\&.
872 Commits are included if they are not TREESAME to any parent (though this can be changed, see
874 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\&.
890 Note how the rule to only follow the TREESAME parent, if one is available, removed
892 from consideration entirely\&.
895 \fBN\fR, but is TREESAME\&. Root commits are compared to an empty tree, so
899 Parent/child relations are only visible with
900 \fB\-\-parents\fR, but that does not affect the commits selected in default mode, so we have shown the parent lines\&.
903 \-\-full\-history without parent rewriting
905 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
918 was excluded because it is TREESAME to both parents\&.
923 were all walked, but only
925 was !TREESAME, so the others do not appear\&.
927 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\&.
930 \-\-full\-history with parent rewriting
932 Ordinary commits are only included if they are !TREESAME (though this can be changed, see
936 Merges are always included\&. However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves\&. This results in
942 \&.\-A\-\-\-M\-\-\-N\-\-\-O\-\-\-P\-\-\-Q
946 `\-\-\-\-\-\-\-\-\-\-\-\-\-\(aq
953 \fB\-\-full\-history\fR
954 without rewriting above\&. Note that
956 was pruned away because it is TREESAME, but the parent list of P was rewritten to contain
958 \fBI\fR\&. The same happened for
968 In addition to the above settings, you can change whether TREESAME affects inclusion:
972 Commits that are walked are included if they are not TREESAME to any parent\&.
977 All commits that are walked are included\&.
980 \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\&.
985 First, build a history graph in the same way that
986 \fB\-\-full\-history\fR
987 with parent rewriting does (see above)\&.
989 Then simplify each commit
993 in the final history according to the following rules:
1011 \h'-04'\(bu\h'+03'\c
1021 with its simplification
1022 \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\&.
1027 \h'-04'\(bu\h'+03'\c
1033 If after this parent rewriting,
1035 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\&.
1038 The effect of this is best shown by way of comparing to
1039 \fB\-\-full\-history\fR
1040 with parent rewriting\&. The example turns into:
1046 \&.\-A\-\-\-M\-\-\-N\-\-\-O
1050 `\-\-\-\-\-\-\-\-\-\(aq
1056 Note the major differences in
1061 \fB\-\-full\-history\fR:
1065 \h'-04'\(bu\h'+03'\c
1071 \fBN\fR\(aqs parent list had
1073 removed, because it is an ancestor of the other parent
1076 remained because it is !TREESAME\&.
1081 \h'-04'\(bu\h'+03'\c
1087 \fBP\fR\(aqs parent list similarly had
1091 was then removed completely, because it had one parent and is TREESAME\&.
1096 \h'-04'\(bu\h'+03'\c
1102 \fBQ\fR\(aqs parent list had
1107 was then removed, because it was a TREESAME root\&.
1109 was then removed completely, because it had one parent and is TREESAME\&.
1113 There is another simplification mode available:
1117 Limit the displayed commits to those directly on the ancestry chain between the \(lqfrom\(rq and \(lqto\(rq commits in the given commit range\&. I\&.e\&. only display commits that are ancestor of the \(lqto\(rq commit and descendants of the \(lqfrom\(rq commit\&.
1119 As an example use case, consider the following commit history:
1125 D\-\-\-E\-\-\-\-\-\-\-F
1127 B\-\-\-C\-\-\-G\-\-\-H\-\-\-I\-\-\-J
1129 A\-\-\-\-\-\-\-K\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-L\-\-M
1137 computes the set of commits that are ancestors of
1138 \fBM\fR, but excludes the ones that are ancestors of
1139 \fBD\fR\&. This is useful to see what happened to the history leading to
1142 \fBD\fR, in the sense that \(lqwhat does
1144 have that did not exist in
1145 \fBD\fR\(rq\&. The result in this example would be all the commits, except
1151 itself, of course)\&.
1153 When we want to find out what commits in
1155 are contaminated with the bug introduced by
1157 and need fixing, however, we might want to view only the subset of
1159 that are actually descendants of
1160 \fBD\fR, i\&.e\&. excluding
1163 \fBK\fR\&. This is exactly what the
1164 \fB\-\-ancestry\-path\fR
1165 option does\&. Applied to the
1167 range, it results in:
1175 G\-\-\-H\-\-\-I\-\-\-J
1185 Before discussing another option, \fB\-\-show\-pulls\fR, we need to create a new example history\&.
1187 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:
1193 \&.\-A\-\-\-M\-\-\-\-\-C\-\-N\-\-\-O\-\-\-P
1195 I B \e R\-\(aq`\-Z\(aq /
1198 `\-\-\-X\-\-\(aq `\-\-\-Y\-\-\(aq
1205 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\&.
1207 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:
1220 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:
1226 \&.\-A\-\-\-M\-\-\-\-\-\-\-\-N\-\-\-O\-\-\-P
1228 I B \e R\-\(aq`\-\-\(aq /
1231 `\-\-\-X\-\-\(aq `\-\-\-\-\-\-\(aq
1238 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: manu unrelated merges appear in the \fB\-\-full\-history\fR results\&.
1240 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:
1246 \&.\-A\-\-\-M\-\-\&.
1258 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\&.
1260 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\&.
1262 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\&.
1266 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\&.
1268 When a merge commit is included by
1269 \fB\-\-show\-pulls\fR, the merge is treated as if it "pulled" the change from another branch\&. When using
1270 \fB\-\-show\-pulls\fR
1271 on this example (and no other options) the resulting graph is:
1277 I\-\-\-X\-\-\-R\-\-\-N
1283 Here, the merge commits
1287 are included because they pulled the commits
1291 into the base branch, respectively\&. These merges are the reason the commits
1295 do not appear in the default history\&.
1298 \fB\-\-show\-pulls\fR
1300 \fB\-\-simplify\-merges\fR, the graph includes all of the necessary information:
1306 \&.\-A\-\-\-M\-\-\&. N
1320 \fBR\fR, the edge from
1324 was simplified away\&. However,
1326 still appears in the history as an important commit because it "pulled" the change
1328 into the main branch\&.
1331 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)\&.
1332 .SH "MAPPING AUTHORS"
1334 See \fBgitmailmap\fR(5)\&.
1336 Note that if \fBgit shortlog\fR is run outside of a repository (to process log contents on standard input), it will look for a \fB\&.mailmap\fR file in the current directory\&.
1339 Part of the \fBgit\fR(1) suite