3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.47.0.rc0.18.ge9356ba3ea
10 .TH "GITMAILMAP" "5" "2024-09-30" "Git 2\&.47\&.0\&.rc0\&.18\&.ge" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 gitmailmap \- Map author/committer names and/or E\-Mail addresses
34 $GIT_WORK_TREE/\&.mailmap
37 If the file \fB\&.mailmap\fR exists at the toplevel of the repository, or at the location pointed to by the \fBmailmap\&.file\fR or \fBmailmap\&.blob\fR configuration options (see \fBgit-config\fR(1)), it is used to map author and committer names and email addresses to canonical real names and email addresses\&.
40 The \fI#\fR character begins a comment to the end of line, blank lines are ignored\&.
42 In the simple form, each line in the file consists of the canonical real name of an author, whitespace, and an email address used in the commit (enclosed by \fI<\fR and \fI>\fR) to map to the name\&. For example:
48 Proper Name <commit@email\&.xx>
54 The more complex forms are:
60 <proper@email\&.xx> <commit@email\&.xx>
66 which allows mailmap to replace only the email part of a commit, and:
72 Proper Name <proper@email\&.xx> <commit@email\&.xx>
78 which allows mailmap to replace both the name and the email of a commit matching the specified commit email address, and:
84 Proper Name <proper@email\&.xx> Commit Name <commit@email\&.xx>
90 which allows mailmap to replace both the name and the email of a commit matching both the specified commit name and email address\&.
92 Both E\-Mails and names are matched case\-insensitively\&. For example this would also match the \fICommit Name <commit@email\&.xx>\fR above:
98 Proper Name <proper@email\&.xx> CoMmIt NaMe <CoMmIt@EmAiL\&.xX>
105 Git does not follow symbolic links when accessing a \fB\&.mailmap\fR file in the working tree\&. This keeps behavior consistent when the file is accessed from the index or a tree versus from the filesystem\&.
108 Your history contains commits by two authors, Jane and Joe, whose names appear in the repository under several forms:
114 Joe Developer <joe@example\&.com>
115 Joe R\&. Developer <joe@example\&.com>
116 Jane Doe <jane@example\&.com>
117 Jane Doe <jane@laptop\&.(none)>
118 Jane D\&. <jane@desktop\&.(none)>
124 Now suppose that Joe wants his middle name initial used, and Jane prefers her family name fully spelled out\&. A \fB\&.mailmap\fR file to correct the names would look like:
130 Joe R\&. Developer <joe@example\&.com>
131 Jane Doe <jane@example\&.com>
132 Jane Doe <jane@desktop\&.(none)>
138 Note that there\(cqs no need to map the name for \fI<jane@laptop\&.(none)>\fR to only correct the names\&. However, leaving the obviously broken \fI<jane@laptop\&.(none)>\fR and \fI<jane@desktop\&.(none)>\fR E\-Mails as\-is is usually not what you want\&. A \fB\&.mailmap\fR file which also corrects those is:
144 Joe R\&. Developer <joe@example\&.com>
145 Jane Doe <jane@example\&.com> <jane@laptop\&.(none)>
146 Jane Doe <jane@example\&.com> <jane@desktop\&.(none)>
152 Finally, let\(cqs say that Joe and Jane shared an E\-Mail address, but not a name, e\&.g\&. by having these two commits in the history generated by a bug reporting system\&. I\&.e\&. names appearing in history as:
158 Joe <bugs@example\&.com>
159 Jane <bugs@example\&.com>
165 A full \fB\&.mailmap\fR file which also handles those cases (an addition of two lines to the above example) would be:
171 Joe R\&. Developer <joe@example\&.com>
172 Jane Doe <jane@example\&.com> <jane@laptop\&.(none)>
173 Jane Doe <jane@example\&.com> <jane@desktop\&.(none)>
174 Joe R\&. Developer <joe@example\&.com> Joe <bugs@example\&.com>
175 Jane Doe <jane@example\&.com> Jane <bugs@example\&.com>
182 \fBgit-check-mailmap\fR(1)
185 Part of the \fBgit\fR(1) suite