1GITMAILMAP(5)                     Git Manual                     GITMAILMAP(5)
2
3
4

NAME

6       gitmailmap - Map author/committer names and/or E-Mail addresses
7

SYNOPSIS

9       $GIT_WORK_TREE/.mailmap
10

DESCRIPTION

12       If the file .mailmap exists at the toplevel of the repository, or at
13       the location pointed to by the mailmap.file or mailmap.blob
14       configuration options (see git-config(1)), it is used to map author and
15       committer names and email addresses to canonical real names and email
16       addresses.
17

SYNTAX

19       The # character begins a comment to the end of line, blank lines are
20       ignored.
21
22       In the simple form, each line in the file consists of the canonical
23       real name of an author, whitespace, and an email address used in the
24       commit (enclosed by < and >) to map to the name. For example:
25
26           Proper Name <commit@email.xx>
27
28       The more complex forms are:
29
30           <proper@email.xx> <commit@email.xx>
31
32       which allows mailmap to replace only the email part of a commit, and:
33
34           Proper Name <proper@email.xx> <commit@email.xx>
35
36       which allows mailmap to replace both the name and the email of a commit
37       matching the specified commit email address, and:
38
39           Proper Name <proper@email.xx> Commit Name <commit@email.xx>
40
41       which allows mailmap to replace both the name and the email of a commit
42       matching both the specified commit name and email address.
43
44       Both E-Mails and names are matched case-insensitively. For example this
45       would also match the Commit Name <commit@email.xx> above:
46
47           Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX>
48

NOTES

50       Git does not follow symbolic links when accessing a .mailmap file in
51       the working tree. This keeps behavior consistent when the file is
52       accessed from the index or a tree versus from the filesystem.
53

EXAMPLES

55       Your history contains commits by two authors, Jane and Joe, whose names
56       appear in the repository under several forms:
57
58           Joe Developer <joe@example.com>
59           Joe R. Developer <joe@example.com>
60           Jane Doe <jane@example.com>
61           Jane Doe <jane@laptop.(none)>
62           Jane D. <jane@desktop.(none)>
63
64       Now suppose that Joe wants his middle name initial used, and Jane
65       prefers her family name fully spelled out. A .mailmap file to correct
66       the names would look like:
67
68           Joe R. Developer <joe@example.com>
69           Jane Doe <jane@example.com>
70           Jane Doe <jane@desktop.(none)>
71
72       Note that there’s no need to map the name for <jane@laptop.(none)> to
73       only correct the names. However, leaving the obviously broken
74       <jane@laptop.(none)> and <jane@desktop.(none)> E-Mails as-is is usually
75       not what you want. A .mailmap file which also corrects those is:
76
77           Joe R. Developer <joe@example.com>
78           Jane Doe <jane@example.com> <jane@laptop.(none)>
79           Jane Doe <jane@example.com> <jane@desktop.(none)>
80
81       Finally, let’s say that Joe and Jane shared an E-Mail address, but not
82       a name, e.g. by having these two commits in the history generated by a
83       bug reporting system. I.e. names appearing in history as:
84
85           Joe <bugs@example.com>
86           Jane <bugs@example.com>
87
88       A full .mailmap file which also handles those cases (an addition of two
89       lines to the above example) would be:
90
91           Joe R. Developer <joe@example.com>
92           Jane Doe <jane@example.com> <jane@laptop.(none)>
93           Jane Doe <jane@example.com> <jane@desktop.(none)>
94           Joe R. Developer <joe@example.com> Joe <bugs@example.com>
95           Jane Doe <jane@example.com> Jane <bugs@example.com>
96

SEE ALSO

98       git-check-mailmap(1)
99

GIT

101       Part of the git(1) suite
102
103
104
105Git 2.33.1                        2021-10-12                     GITMAILMAP(5)
Impressum