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