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

NAME

6       git-shortlog - Summarize 'git log' output
7

SYNOPSIS

9       git shortlog [<options>] [<revision-range>] [[--] <path>...]
10       git log --pretty=short | git shortlog [<options>]
11

DESCRIPTION

13       Summarizes git log output in a format suitable for inclusion in release
14       announcements. Each commit will be grouped by author and title.
15
16       Additionally, "[PATCH]" will be stripped from the commit description.
17
18       If no revisions are passed on the command line and either standard
19       input is not a terminal or there is no current branch, git shortlog
20       will output a summary of the log read from standard input, without
21       reference to the current repository.
22

OPTIONS

24       -n, --numbered
25           Sort output according to the number of commits per author instead
26           of author alphabetic order.
27
28       -s, --summary
29           Suppress commit description and provide a commit count summary
30           only.
31
32       -e, --email
33           Show the email address of each author.
34
35       --format[=<format>]
36           Instead of the commit subject, use some other information to
37           describe each commit.  <format> can be any string accepted by the
38           --format option of git log, such as * [%h] %s. (See the "PRETTY
39           FORMATS" section of git-log(1).)
40
41               Each pretty-printed commit will be rewrapped before it is shown.
42
43       --date=<format>
44           Show dates formatted according to the given date string. (See the
45           --date option in the "Commit Formatting" section of git-log(1)).
46           Useful with --group=format:<format>.
47
48       --group=<type>
49           Group commits based on <type>. If no --group option is specified,
50           the default is author.  <type> is one of:
51
52author, commits are grouped by author
53
54committer, commits are grouped by committer (the same as -c)
55
56trailer:<field>, the <field> is interpreted as a
57               case-insensitive commit message trailer (see git-interpret-
58               trailers(1)). For example, if your project uses Reviewed-by
59               trailers, you might want to see who has been reviewing with git
60               shortlog -ns --group=trailer:reviewed-by.
61
62format:<format>, any string accepted by the --format option of
63               git log. (See the "PRETTY FORMATS" section of git-log(1).)
64
65               Note that commits that do not include the trailer will not be
66               counted. Likewise, commits with multiple trailers (e.g.,
67               multiple signoffs) may be counted more than once (but only once
68               per unique trailer value in that commit).
69
70               Shortlog will attempt to parse each trailer value as a name
71               <email> identity. If successful, the mailmap is applied and the
72               email is omitted unless the --email option is specified. If the
73               value cannot be parsed as an identity, it will be taken
74               literally and completely.
75
76           If --group is specified multiple times, commits are counted under
77           each value (but again, only once per unique value in that commit).
78           For example, git shortlog --group=author
79           --group=trailer:co-authored-by counts both authors and co-authors.
80
81       -c, --committer
82           This is an alias for --group=committer.
83
84       -w[<width>[,<indent1>[,<indent2>]]]
85           Linewrap the output by wrapping each line at width. The first line
86           of each entry is indented by indent1 spaces, and the second and
87           subsequent lines are indented by indent2 spaces.  width, indent1,
88           and indent2 default to 76, 6 and 9 respectively.
89
90           If width is 0 (zero) then indent the lines of the output without
91           wrapping them.
92
93       <revision-range>
94           Show only commits in the specified revision range. When no
95           <revision-range> is specified, it defaults to HEAD (i.e. the whole
96           history leading to the current commit).  origin..HEAD specifies all
97           the commits reachable from the current commit (i.e.  HEAD), but not
98           from origin. For a complete list of ways to spell <revision-range>,
99           see the "Specifying Ranges" section of gitrevisions(7).
100
101       [--] <path>...
102           Consider only commits that are enough to explain how the files that
103           match the specified paths came to be.
104
105           Paths may need to be prefixed with -- to separate them from options
106           or the revision range, when confusion arises.
107
108   Commit Limiting
109       Besides specifying a range of commits that should be listed using the
110       special notations explained in the description, additional commit
111       limiting may be applied.
112
113       Using more options generally further limits the output (e.g.
114       --since=<date1> limits to commits newer than <date1>, and using it with
115       --grep=<pattern> further limits to commits whose log message has a line
116       that matches <pattern>), unless otherwise noted.
117
118       Note that these are applied before commit ordering and formatting
119       options, such as --reverse.
120
121       -<number>, -n <number>, --max-count=<number>
122           Limit the number of commits to output.
123
124       --skip=<number>
125           Skip number commits before starting to show the commit output.
126
127       --since=<date>, --after=<date>
128           Show commits more recent than a specific date.
129
130       --since-as-filter=<date>
131           Show all commits more recent than a specific date. This visits all
132           commits in the range, rather than stopping at the first commit
133           which is older than a specific date.
134
135       --until=<date>, --before=<date>
136           Show commits older than a specific date.
137
138       --author=<pattern>, --committer=<pattern>
139           Limit the commits output to ones with author/committer header lines
140           that match the specified pattern (regular expression). With more
141           than one --author=<pattern>, commits whose author matches any of
142           the given patterns are chosen (similarly for multiple
143           --committer=<pattern>).
144
145       --grep-reflog=<pattern>
146           Limit the commits output to ones with reflog entries that match the
147           specified pattern (regular expression). With more than one
148           --grep-reflog, commits whose reflog message matches any of the
149           given patterns are chosen. It is an error to use this option unless
150           --walk-reflogs is in use.
151
152       --grep=<pattern>
153           Limit the commits output to ones with log message that matches the
154           specified pattern (regular expression). With more than one
155           --grep=<pattern>, commits whose message matches any of the given
156           patterns are chosen (but see --all-match).
157
158           When --notes is in effect, the message from the notes is matched as
159           if it were part of the log message.
160
161       --all-match
162           Limit the commits output to ones that match all given --grep,
163           instead of ones that match at least one.
164
165       --invert-grep
166           Limit the commits output to ones with log message that do not match
167           the pattern specified with --grep=<pattern>.
168
169       -i, --regexp-ignore-case
170           Match the regular expression limiting patterns without regard to
171           letter case.
172
173       --basic-regexp
174           Consider the limiting patterns to be basic regular expressions;
175           this is the default.
176
177       -E, --extended-regexp
178           Consider the limiting patterns to be extended regular expressions
179           instead of the default basic regular expressions.
180
181       -F, --fixed-strings
182           Consider the limiting patterns to be fixed strings (don’t interpret
183           pattern as a regular expression).
184
185       -P, --perl-regexp
186           Consider the limiting patterns to be Perl-compatible regular
187           expressions.
188
189           Support for these types of regular expressions is an optional
190           compile-time dependency. If Git wasn’t compiled with support for
191           them providing this option will cause it to die.
192
193       --remove-empty
194           Stop when a given path disappears from the tree.
195
196       --merges
197           Print only merge commits. This is exactly the same as
198           --min-parents=2.
199
200       --no-merges
201           Do not print commits with more than one parent. This is exactly the
202           same as --max-parents=1.
203
204       --min-parents=<number>, --max-parents=<number>, --no-min-parents,
205       --no-max-parents
206           Show only commits which have at least (or at most) that many parent
207           commits. In particular, --max-parents=1 is the same as --no-merges,
208           --min-parents=2 is the same as --merges.  --max-parents=0 gives all
209           root commits and --min-parents=3 all octopus merges.
210
211           --no-min-parents and --no-max-parents reset these limits (to no
212           limit) again. Equivalent forms are --min-parents=0 (any commit has
213           0 or more parents) and --max-parents=-1 (negative numbers denote no
214           upper limit).
215
216       --first-parent
217           When finding commits to include, follow only the first parent
218           commit upon seeing a merge commit. This option can give a better
219           overview when viewing the evolution of a particular topic branch,
220           because merges into a topic branch tend to be only about adjusting
221           to updated upstream from time to time, and this option allows you
222           to ignore the individual commits brought in to your history by such
223           a merge.
224
225       --exclude-first-parent-only
226           When finding commits to exclude (with a ^), follow only the first
227           parent commit upon seeing a merge commit. This can be used to find
228           the set of changes in a topic branch from the point where it
229           diverged from the remote branch, given that arbitrary merges can be
230           valid topic branch changes.
231
232       --not
233           Reverses the meaning of the ^ prefix (or lack thereof) for all
234           following revision specifiers, up to the next --not.
235
236       --all
237           Pretend as if all the refs in refs/, along with HEAD, are listed on
238           the command line as <commit>.
239
240       --branches[=<pattern>]
241           Pretend as if all the refs in refs/heads are listed on the command
242           line as <commit>. If <pattern> is given, limit branches to ones
243           matching given shell glob. If pattern lacks ?, *, or [, /* at the
244           end is implied.
245
246       --tags[=<pattern>]
247           Pretend as if all the refs in refs/tags are listed on the command
248           line as <commit>. If <pattern> is given, limit tags to ones
249           matching given shell glob. If pattern lacks ?, *, or [, /* at the
250           end is implied.
251
252       --remotes[=<pattern>]
253           Pretend as if all the refs in refs/remotes are listed on the
254           command line as <commit>. If <pattern> is given, limit
255           remote-tracking branches to ones matching given shell glob. If
256           pattern lacks ?, *, or [, /* at the end is implied.
257
258       --glob=<glob-pattern>
259           Pretend as if all the refs matching shell glob <glob-pattern> are
260           listed on the command line as <commit>. Leading refs/, is
261           automatically prepended if missing. If pattern lacks ?, *, or [, /*
262           at the end is implied.
263
264       --exclude=<glob-pattern>
265           Do not include refs matching <glob-pattern> that the next --all,
266           --branches, --tags, --remotes, or --glob would otherwise consider.
267           Repetitions of this option accumulate exclusion patterns up to the
268           next --all, --branches, --tags, --remotes, or --glob option (other
269           options or arguments do not clear accumulated patterns).
270
271           The patterns given should not begin with refs/heads, refs/tags, or
272           refs/remotes when applied to --branches, --tags, or --remotes,
273           respectively, and they must begin with refs/ when applied to --glob
274           or --all. If a trailing /* is intended, it must be given
275           explicitly.
276
277       --exclude-hidden=[receive|uploadpack]
278           Do not include refs that would be hidden by git-receive-pack or
279           git-upload-pack by consulting the appropriate receive.hideRefs or
280           uploadpack.hideRefs configuration along with transfer.hideRefs (see
281           git-config(1)). This option affects the next pseudo-ref option
282           --all or --glob and is cleared after processing them.
283
284       --reflog
285           Pretend as if all objects mentioned by reflogs are listed on the
286           command line as <commit>.
287
288       --alternate-refs
289           Pretend as if all objects mentioned as ref tips of alternate
290           repositories were listed on the command line. An alternate
291           repository is any repository whose object directory is specified in
292           objects/info/alternates. The set of included objects may be
293           modified by core.alternateRefsCommand, etc. See git-config(1).
294
295       --single-worktree
296           By default, all working trees will be examined by the following
297           options when there are more than one (see git-worktree(1)): --all,
298           --reflog and --indexed-objects. This option forces them to examine
299           the current working tree only.
300
301       --ignore-missing
302           Upon seeing an invalid object name in the input, pretend as if the
303           bad input was not given.
304
305       --bisect
306           Pretend as if the bad bisection ref refs/bisect/bad was listed and
307           as if it was followed by --not and the good bisection refs
308           refs/bisect/good-* on the command line.
309
310       --stdin
311           In addition to the <commit> listed on the command line, read them
312           from the standard input. If a -- separator is seen, stop reading
313           commits and start reading paths to limit the result.
314
315       --cherry-mark
316           Like --cherry-pick (see below) but mark equivalent commits with =
317           rather than omitting them, and inequivalent ones with +.
318
319       --cherry-pick
320           Omit any commit that introduces the same change as another commit
321           on the “other side” when the set of commits are limited with
322           symmetric difference.
323
324           For example, if you have two branches, A and B, a usual way to list
325           all commits on only one side of them is with --left-right (see the
326           example below in the description of the --left-right option).
327           However, it shows the commits that were cherry-picked from the
328           other branch (for example, “3rd on b” may be cherry-picked from
329           branch A). With this option, such pairs of commits are excluded
330           from the output.
331
332       --left-only, --right-only
333           List only commits on the respective side of a symmetric difference,
334           i.e. only those which would be marked < resp.  > by --left-right.
335
336           For example, --cherry-pick --right-only A...B omits those commits
337           from B which are in A or are patch-equivalent to a commit in A. In
338           other words, this lists the + commits from git cherry A B. More
339           precisely, --cherry-pick --right-only --no-merges gives the exact
340           list.
341
342       --cherry
343           A synonym for --right-only --cherry-mark --no-merges; useful to
344           limit the output to the commits on our side and mark those that
345           have been applied to the other side of a forked history with git
346           log --cherry upstream...mybranch, similar to git cherry upstream
347           mybranch.
348
349       -g, --walk-reflogs
350           Instead of walking the commit ancestry chain, walk reflog entries
351           from the most recent one to older ones. When this option is used
352           you cannot specify commits to exclude (that is, ^commit,
353           commit1..commit2, and commit1...commit2 notations cannot be used).
354
355           With --pretty format other than oneline and reference (for obvious
356           reasons), this causes the output to have two extra lines of
357           information taken from the reflog. The reflog designator in the
358           output may be shown as ref@{Nth} (where Nth is the
359           reverse-chronological index in the reflog) or as ref@{timestamp}
360           (with the timestamp for that entry), depending on a few rules:
361
362            1. If the starting point is specified as ref@{Nth}, show the index
363               format.
364
365            2. If the starting point was specified as ref@{now}, show the
366               timestamp format.
367
368            3. If neither was used, but --date was given on the command line,
369               show the timestamp in the format requested by --date.
370
371            4. Otherwise, show the index format.
372
373           Under --pretty=oneline, the commit message is prefixed with this
374           information on the same line. This option cannot be combined with
375           --reverse. See also git-reflog(1).
376
377           Under --pretty=reference, this information will not be shown at
378           all.
379
380       --merge
381           After a failed merge, show refs that touch files having a conflict
382           and don’t exist on all heads to merge.
383
384       --boundary
385           Output excluded boundary commits. Boundary commits are prefixed
386           with -.
387
388   History Simplification
389       Sometimes you are only interested in parts of the history, for example
390       the commits modifying a particular <path>. But there are two parts of
391       History Simplification, one part is selecting the commits and the other
392       is how to do it, as there are various strategies to simplify the
393       history.
394
395       The following options select the commits to be shown:
396
397       <paths>
398           Commits modifying the given <paths> are selected.
399
400       --simplify-by-decoration
401           Commits that are referred by some branch or tag are selected.
402
403       Note that extra commits can be shown to give a meaningful history.
404
405       The following options affect the way the simplification is performed:
406
407       Default mode
408           Simplifies the history to the simplest history explaining the final
409           state of the tree. Simplest because it prunes some side branches if
410           the end result is the same (i.e. merging branches with the same
411           content)
412
413       --show-pulls
414           Include all commits from the default mode, but also any merge
415           commits that are not TREESAME to the first parent but are TREESAME
416           to a later parent. This mode is helpful for showing the merge
417           commits that "first introduced" a change to a branch.
418
419       --full-history
420           Same as the default mode, but does not prune some history.
421
422       --dense
423           Only the selected commits are shown, plus some to have a meaningful
424           history.
425
426       --sparse
427           All commits in the simplified history are shown.
428
429       --simplify-merges
430           Additional option to --full-history to remove some needless merges
431           from the resulting history, as there are no selected commits
432           contributing to this merge.
433
434       --ancestry-path[=<commit>]
435           When given a range of commits to display (e.g.  commit1..commit2 or
436           commit2 ^commit1), only display commits in that range that are
437           ancestors of <commit>, descendants of <commit>, or <commit> itself.
438           If no commit is specified, use commit1 (the excluded part of the
439           range) as <commit>. Can be passed multiple times; if so, a commit
440           is included if it is any of the commits given or if it is an
441           ancestor or descendant of one of them.
442
443       A more detailed explanation follows.
444
445       Suppose you specified foo as the <paths>. We shall call commits that
446       modify foo !TREESAME, and the rest TREESAME. (In a diff filtered for
447       foo, they look different and equal, respectively.)
448
449       In the following, we will always refer to the same example history to
450       illustrate the differences between simplification settings. We assume
451       that you are filtering for a file foo in this commit graph:
452
453                     .-A---M---N---O---P---Q
454                    /     /   /   /   /   /
455                   I     B   C   D   E   Y
456                    \   /   /   /   /   /
457                     `-------------'   X
458
459       The horizontal line of history A---Q is taken to be the first parent of
460       each merge. The commits are:
461
462I is the initial commit, in which foo exists with contents “asdf”,
463           and a file quux exists with contents “quux”. Initial commits are
464           compared to an empty tree, so I is !TREESAME.
465
466       •   In A, foo contains just “foo”.
467
468B contains the same change as A. Its merge M is trivial and hence
469           TREESAME to all parents.
470
471C does not change foo, but its merge N changes it to “foobar”, so
472           it is not TREESAME to any parent.
473
474D sets foo to “baz”. Its merge O combines the strings from N and D
475           to “foobarbaz”; i.e., it is not TREESAME to any parent.
476
477E changes quux to “xyzzy”, and its merge P combines the strings to
478           “quux xyzzy”.  P is TREESAME to O, but not to E.
479
480X is an independent root commit that added a new file side, and Y
481           modified it.  Y is TREESAME to X. Its merge Q added side to P, and
482           Q is TREESAME to P, but not to Y.
483
484       rev-list walks backwards through history, including or excluding
485       commits based on whether --full-history and/or parent rewriting (via
486       --parents or --children) are used. The following settings are
487       available.
488
489       Default mode
490           Commits are included if they are not TREESAME to any parent (though
491           this can be changed, see --sparse below). If the commit was a
492           merge, and it was TREESAME to one parent, follow only that parent.
493           (Even if there are several TREESAME parents, follow only one of
494           them.) Otherwise, follow all parents.
495
496           This results in:
497
498                         .-A---N---O
499                        /     /   /
500                       I---------D
501
502           Note how the rule to only follow the TREESAME parent, if one is
503           available, removed B from consideration entirely.  C was considered
504           via N, but is TREESAME. Root commits are compared to an empty tree,
505           so I is !TREESAME.
506
507           Parent/child relations are only visible with --parents, but that
508           does not affect the commits selected in default mode, so we have
509           shown the parent lines.
510
511       --full-history without parent rewriting
512           This mode differs from the default in one point: always follow all
513           parents of a merge, even if it is TREESAME to one of them. Even if
514           more than one side of the merge has commits that are included, this
515           does not imply that the merge itself is! In the example, we get
516
517                       I  A  B  N  D  O  P  Q
518
519           M was excluded because it is TREESAME to both parents.  E, C and B
520           were all walked, but only B was !TREESAME, so the others do not
521           appear.
522
523           Note that without parent rewriting, it is not really possible to
524           talk about the parent/child relationships between the commits, so
525           we show them disconnected.
526
527       --full-history with parent rewriting
528           Ordinary commits are only included if they are !TREESAME (though
529           this can be changed, see --sparse below).
530
531           Merges are always included. However, their parent list is
532           rewritten: Along each parent, prune away commits that are not
533           included themselves. This results in
534
535                         .-A---M---N---O---P---Q
536                        /     /   /   /   /
537                       I     B   /   D   /
538                        \   /   /   /   /
539                         `-------------'
540
541           Compare to --full-history without rewriting above. Note that E was
542           pruned away because it is TREESAME, but the parent list of P was
543           rewritten to contain E's parent I. The same happened for C and N,
544           and X, Y and Q.
545
546       In addition to the above settings, you can change whether TREESAME
547       affects inclusion:
548
549       --dense
550           Commits that are walked are included if they are not TREESAME to
551           any parent.
552
553       --sparse
554           All commits that are walked are included.
555
556           Note that without --full-history, this still simplifies merges: if
557           one of the parents is TREESAME, we follow only that one, so the
558           other sides of the merge are never walked.
559
560       --simplify-merges
561           First, build a history graph in the same way that --full-history
562           with parent rewriting does (see above).
563
564           Then simplify each commit C to its replacement C' in the final
565           history according to the following rules:
566
567           •   Set C' to C.
568
569           •   Replace each parent P of C' with its simplification P'. In the
570               process, drop parents that are ancestors of other parents or
571               that are root commits TREESAME to an empty tree, and remove
572               duplicates, but take care to never drop all parents that we are
573               TREESAME to.
574
575           •   If after this parent rewriting, C' is a root or merge commit
576               (has zero or >1 parents), a boundary commit, or !TREESAME, it
577               remains. Otherwise, it is replaced with its only parent.
578
579           The effect of this is best shown by way of comparing to
580           --full-history with parent rewriting. The example turns into:
581
582                         .-A---M---N---O
583                        /     /       /
584                       I     B       D
585                        \   /       /
586                         `---------'
587
588           Note the major differences in N, P, and Q over --full-history:
589
590N's parent list had I removed, because it is an ancestor of the
591               other parent M. Still, N remained because it is !TREESAME.
592
593P's parent list similarly had I removed.  P was then removed
594               completely, because it had one parent and is TREESAME.
595
596Q's parent list had Y simplified to X.  X was then removed,
597               because it was a TREESAME root.  Q was then removed completely,
598               because it had one parent and is TREESAME.
599
600       There is another simplification mode available:
601
602       --ancestry-path[=<commit>]
603           Limit the displayed commits to those which are an ancestor of
604           <commit>, or which are a descendant of <commit>, or are <commit>
605           itself.
606
607           As an example use case, consider the following commit history:
608
609                           D---E-------F
610                          /     \       \
611                         B---C---G---H---I---J
612                        /                     \
613                       A-------K---------------L--M
614
615           A regular D..M computes the set of commits that are ancestors of M,
616           but excludes the ones that are ancestors of D. This is useful to
617           see what happened to the history leading to M since D, in the sense
618           that “what does M have that did not exist in D”. The result in this
619           example would be all the commits, except A and B (and D itself, of
620           course).
621
622           When we want to find out what commits in M are contaminated with
623           the bug introduced by D and need fixing, however, we might want to
624           view only the subset of D..M that are actually descendants of D,
625           i.e. excluding C and K. This is exactly what the --ancestry-path
626           option does. Applied to the D..M range, it results in:
627
628                               E-------F
629                                \       \
630                                 G---H---I---J
631                                              \
632                                               L--M
633
634           We can also use --ancestry-path=D instead of --ancestry-path which
635           means the same thing when applied to the D..M range but is just
636           more explicit.
637
638           If we instead are interested in a given topic within this range,
639           and all commits affected by that topic, we may only want to view
640           the subset of D..M which contain that topic in their ancestry path.
641           So, using --ancestry-path=H D..M for example would result in:
642
643                               E
644                                \
645                                 G---H---I---J
646                                              \
647                                               L--M
648
649           Whereas --ancestry-path=K D..M would result in
650
651                               K---------------L--M
652
653       Before discussing another option, --show-pulls, we need to create a new
654       example history.
655
656       A common problem users face when looking at simplified history is that
657       a commit they know changed a file somehow does not appear in the file’s
658       simplified history. Let’s demonstrate a new example and show how
659       options such as --full-history and --simplify-merges works in that
660       case:
661
662                     .-A---M-----C--N---O---P
663                    /     / \  \  \/   /   /
664                   I     B   \  R-'`-Z'   /
665                    \   /     \/         /
666                     \ /      /\        /
667                      `---X--'  `---Y--'
668
669       For this example, suppose I created file.txt which was modified by A,
670       B, and X in different ways. The single-parent commits C, Z, and Y do
671       not change file.txt. The merge commit M was created by resolving the
672       merge conflict to include both changes from A and B and hence is not
673       TREESAME to either. The merge commit R, however, was created by
674       ignoring the contents of file.txt at M and taking only the contents of
675       file.txt at X. Hence, R is TREESAME to X but not M. Finally, the
676       natural merge resolution to create N is to take the contents of
677       file.txt at R, so N is TREESAME to R but not C. The merge commits O and
678       P are TREESAME to their first parents, but not to their second parents,
679       Z and Y respectively.
680
681       When using the default mode, N and R both have a TREESAME parent, so
682       those edges are walked and the others are ignored. The resulting
683       history graph is:
684
685                   I---X
686
687       When using --full-history, Git walks every edge. This will discover the
688       commits A and B and the merge M, but also will reveal the merge commits
689       O and P. With parent rewriting, the resulting graph is:
690
691                     .-A---M--------N---O---P
692                    /     / \  \  \/   /   /
693                   I     B   \  R-'`--'   /
694                    \   /     \/         /
695                     \ /      /\        /
696                      `---X--'  `------'
697
698       Here, the merge commits O and P contribute extra noise, as they did not
699       actually contribute a change to file.txt. They only merged a topic that
700       was based on an older version of file.txt. This is a common issue in
701       repositories using a workflow where many contributors work in parallel
702       and merge their topic branches along a single trunk: many unrelated
703       merges appear in the --full-history results.
704
705       When using the --simplify-merges option, the commits O and P disappear
706       from the results. This is because the rewritten second parents of O and
707       P are reachable from their first parents. Those edges are removed and
708       then the commits look like single-parent commits that are TREESAME to
709       their parent. This also happens to the commit N, resulting in a history
710       view as follows:
711
712                     .-A---M--.
713                    /     /    \
714                   I     B      R
715                    \   /      /
716                     \ /      /
717                      `---X--'
718
719       In this view, we see all of the important single-parent changes from A,
720       B, and X. We also see the carefully-resolved merge M and the
721       not-so-carefully-resolved merge R. This is usually enough information
722       to determine why the commits A and B "disappeared" from history in the
723       default view. However, there are a few issues with this approach.
724
725       The first issue is performance. Unlike any previous option, the
726       --simplify-merges option requires walking the entire commit history
727       before returning a single result. This can make the option difficult to
728       use for very large repositories.
729
730       The second issue is one of auditing. When many contributors are working
731       on the same repository, it is important which merge commits introduced
732       a change into an important branch. The problematic merge R above is not
733       likely to be the merge commit that was used to merge into an important
734       branch. Instead, the merge N was used to merge R and X into the
735       important branch. This commit may have information about why the change
736       X came to override the changes from A and B in its commit message.
737
738       --show-pulls
739           In addition to the commits shown in the default history, show each
740           merge commit that is not TREESAME to its first parent but is
741           TREESAME to a later parent.
742
743           When a merge commit is included by --show-pulls, the merge is
744           treated as if it "pulled" the change from another branch. When
745           using --show-pulls on this example (and no other options) the
746           resulting graph is:
747
748                       I---X---R---N
749
750           Here, the merge commits R and N are included because they pulled
751           the commits X and R into the base branch, respectively. These
752           merges are the reason the commits A and B do not appear in the
753           default history.
754
755           When --show-pulls is paired with --simplify-merges, the graph
756           includes all of the necessary information:
757
758                         .-A---M--.   N
759                        /     /    \ /
760                       I     B      R
761                        \   /      /
762                         \ /      /
763                          `---X--'
764
765           Notice that since M is reachable from R, the edge from N to M was
766           simplified away. However, N still appears in the history as an
767           important commit because it "pulled" the change R into the main
768           branch.
769
770       The --simplify-by-decoration option allows you to view only the big
771       picture of the topology of the history, by omitting commits that are
772       not referenced by tags. Commits are marked as !TREESAME (in other
773       words, kept after history simplification rules described above) if (1)
774       they are referenced by tags, or (2) they change the contents of the
775       paths given on the command line. All other commits are marked as
776       TREESAME (subject to be simplified away).
777

MAPPING AUTHORS

779       See gitmailmap(5).
780
781       Note that if git shortlog is run outside of a repository (to process
782       log contents on standard input), it will look for a .mailmap file in
783       the current directory.
784

GIT

786       Part of the git(1) suite
787
788
789
790Git 2.39.1                        2023-01-13                   GIT-SHORTLOG(1)
Impressum