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

EXAMPLES

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

SEE ALSO

93       git-check-mailmap(1)
94

GIT

96       Part of the git(1) suite
97
98
99
100Git 2.31.1                        2021-03-26                     GITMAILMAP(5)
Impressum