]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/gitmailmap.txt
tests: refactor a few tests to use "test_commit --append"
[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--------
10$GIT_WORK_DIR/.mailmap
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
42957af0
ÆAB
52
53EXAMPLES
54--------
55
7d48e9e6
MSO
56Example 1: Your history contains commits by two authors, Jane
57and Joe, whose names appear in the repository under several forms:
58
59------------
60Joe Developer <joe@example.com>
61Joe R. Developer <joe@example.com>
62Jane Doe <jane@example.com>
63Jane Doe <jane@laptop.(none)>
64Jane D. <jane@desktop.(none)>
65------------
66
67Now suppose that Joe wants his middle name initial used, and Jane
68prefers her family name fully spelled out. A proper `.mailmap` file
69would look like:
70
71------------
72Jane Doe <jane@desktop.(none)>
73Joe R. Developer <joe@example.com>
74------------
75
f430ed8b 76Note how there is no need for an entry for `<jane@laptop.(none)>`, because the
b89510f0 77real name of that author is already correct.
7d48e9e6
MSO
78
79Example 2: Your repository contains commits from the following
80authors:
81
82------------
83nick1 <bugs@company.xx>
84nick2 <bugs@company.xx>
85nick2 <nick2@company.xx>
86santa <me@company.xx>
87claus <me@company.xx>
88CTO <cto@coompany.xx>
89------------
90
b89510f0 91Then you might want a `.mailmap` file that looks like:
7d48e9e6
MSO
92------------
93<cto@company.xx> <cto@coompany.xx>
94Some Dude <some@dude.xx> nick1 <bugs@company.xx>
95Other Author <other@author.xx> nick2 <bugs@company.xx>
96Other Author <other@author.xx> <nick2@company.xx>
97Santa Claus <santa.claus@northpole.xx> <me@company.xx>
98------------
99
42957af0
ÆAB
100
101
102SEE ALSO
103--------
104linkgit:git-check-mailmap[1]
105
106
107GIT
108---
109Part of the linkgit:git[1] suite