]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/gitmailmap.txt
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / Documentation / gitmailmap.txt
CommitLineData
42957af0
ÆAB
1gitmailmap(5)
2=============
3
4NAME
5----
6gitmailmap - Map author/committer names and/or E-Mail addresses
7
8SYNOPSIS
9--------
97f4b4c4 10$GIT_WORK_TREE/.mailmap
42957af0
ÆAB
11
12
13DESCRIPTION
14-----------
15
7d48e9e6 16If the file `.mailmap` exists at the toplevel of the repository, or at
4f2ee994
ÆAB
17the location pointed to by the `mailmap.file` or `mailmap.blob`
18configuration options (see linkgit:git-config[1]), it
7d48e9e6
MSO
19is used to map author and committer names and email addresses to
20canonical real names and email addresses.
21
42957af0
ÆAB
22
23SYNTAX
24------
25
fcafb753
ÆAB
26The '#' character begins a comment to the end of line, blank lines
27are ignored.
28
7d48e9e6
MSO
29In the simple form, each line in the file consists of the canonical
30real name of an author, whitespace, and an email address used in the
b89510f0 31commit (enclosed by '<' and '>') to map to the name. For example:
7d48e9e6
MSO
32--
33 Proper Name <commit@email.xx>
34--
35
b89510f0 36The more complex forms are:
7d48e9e6
MSO
37--
38 <proper@email.xx> <commit@email.xx>
39--
b89510f0 40which allows mailmap to replace only the email part of a commit, and:
7d48e9e6
MSO
41--
42 Proper Name <proper@email.xx> <commit@email.xx>
43--
44which allows mailmap to replace both the name and the email of a
b89510f0 45commit matching the specified commit email address, and:
7d48e9e6
MSO
46--
47 Proper Name <proper@email.xx> Commit Name <commit@email.xx>
48--
49which allows mailmap to replace both the name and the email of a
50commit matching both the specified commit name and email address.
51
238803cb 52Both E-Mails and names are matched case-insensitively. For example
f89f46b7 53this would also match the 'Commit Name <commit&#64;email.xx>' above:
238803cb 54--
f89f46b7 55 Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX>
238803cb 56--
42957af0
ÆAB
57
58EXAMPLES
59--------
60
05b5ff21 61Your history contains commits by two authors, Jane
7d48e9e6
MSO
62and Joe, whose names appear in the repository under several forms:
63
64------------
65Joe Developer <joe@example.com>
66Joe R. Developer <joe@example.com>
67Jane Doe <jane@example.com>
68Jane Doe <jane@laptop.(none)>
69Jane D. <jane@desktop.(none)>
70------------
71
72Now suppose that Joe wants his middle name initial used, and Jane
05b5ff21
ÆAB
73prefers her family name fully spelled out. A `.mailmap` file to
74correct the names would look like:
7d48e9e6
MSO
75
76------------
7d48e9e6 77Joe R. Developer <joe@example.com>
05b5ff21
ÆAB
78Jane Doe <jane@example.com>
79Jane Doe <jane@desktop.(none)>
7d48e9e6
MSO
80------------
81
f89f46b7 82Note that there's no need to map the name for '<jane&#64;laptop.(none)>' to
05b5ff21 83only correct the names. However, leaving the obviously broken
f89f46b7 84'<jane&#64;laptop.(none)>' and '<jane&#64;desktop.(none)>' E-Mails as-is is
05b5ff21
ÆAB
85usually not what you want. A `.mailmap` file which also corrects those
86is:
7d48e9e6 87
05b5ff21
ÆAB
88------------
89Joe R. Developer <joe@example.com>
90Jane Doe <jane@example.com> <jane@laptop.(none)>
91Jane Doe <jane@example.com> <jane@desktop.(none)>
92------------
93
94Finally, let's say that Joe and Jane shared an E-Mail address, but not
95a name, e.g. by having these two commits in the history generated by a
96bug reporting system. I.e. names appearing in history as:
7d48e9e6
MSO
97
98------------
05b5ff21
ÆAB
99Joe <bugs@example.com>
100Jane <bugs@example.com>
7d48e9e6
MSO
101------------
102
05b5ff21
ÆAB
103A full `.mailmap` file which also handles those cases (an addition of
104two lines to the above example) would be:
105
7d48e9e6 106------------
05b5ff21
ÆAB
107Joe R. Developer <joe@example.com>
108Jane Doe <jane@example.com> <jane@laptop.(none)>
109Jane Doe <jane@example.com> <jane@desktop.(none)>
110Joe R. Developer <joe@example.com> Joe <bugs@example.com>
111Jane Doe <jane@example.com> Jane <bugs@example.com>
7d48e9e6
MSO
112------------
113
42957af0
ÆAB
114
115
116SEE ALSO
117--------
118linkgit:git-check-mailmap[1]
119
120
121GIT
122---
123Part of the linkgit:git[1] suite