Skip to content

Commit 33dd8cb

Browse files
authored
Instructions to aggregate authors
Git itself offers a tool to aggregate authors in a much more versatile manner than what we could or should provide in secondary code.
1 parent 7488692 commit 33dd8cb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,21 @@ An example of how to use in your templates:
8585
```
8686

8787
Alternatively, you could use the simple preformatted ``{{ git_authors_summary }}`` to insert a summary of the authors.
88+
89+
### Aggregating Authors
90+
91+
In some repositories authors may have committed with differing name/email combinations.
92+
In order to prevent the output being split it is possible to aggregate authors on
93+
arbitrary elements by providing a file `.mailmap` in the repository's root directory.
94+
This is a feature of Git itself. The following example will aggregate the contributions
95+
of Jane Doe committed under two email addresses:
96+
97+
```
98+
# .mailmap
99+
100+
```
101+
102+
This will map commits made with the `private-email.com` to the company address. For more details
103+
and further options (e.g. mapping between different names or misspellings etc. see the
104+
[git-blame documentation](https://git-scm.com/docs/git-blame#_mapping_authors).
105+

0 commit comments

Comments
 (0)