1GIT-CHECK-MAILMAP(1)              Git Manual              GIT-CHECK-MAILMAP(1)
2
3
4

NAME

6       git-check-mailmap - Show canonical names and email addresses of
7       contacts
8

SYNOPSIS

10       git check-mailmap [<options>] <contact>...
11
12

DESCRIPTION

14       For each “Name <user@host>” or “<user@host>” from the command-line or
15       standard input (when using --stdin), look up the person’s canonical
16       name and email address (see "Mapping Authors" below). If found, print
17       them; otherwise print the input as-is.
18

OPTIONS

20       --stdin
21           Read contacts, one per line, from the standard input after
22           exhausting contacts provided on the command-line.
23

OUTPUT

25       For each contact, a single line is output, terminated by a newline. If
26       the name is provided or known to the mailmap, “Name <user@host>” is
27       printed; otherwise only “<user@host>” is printed.
28

MAPPING AUTHORS

30       If the file .mailmap exists at the toplevel of the repository, or at
31       the location pointed to by the mailmap.file or mailmap.blob
32       configuration options, it is used to map author and committer names and
33       email addresses to canonical real names and email addresses.
34
35       In the simple form, each line in the file consists of the canonical
36       real name of an author, whitespace, and an email address used in the
37       commit (enclosed by < and >) to map to the name. For example:
38
39           Proper Name <commit@email.xx>
40
41       The more complex forms are:
42
43           <proper@email.xx> <commit@email.xx>
44
45       which allows mailmap to replace only the email part of a commit, and:
46
47           Proper Name <proper@email.xx> <commit@email.xx>
48
49       which allows mailmap to replace both the name and the email of a commit
50       matching the specified commit email address, and:
51
52           Proper Name <proper@email.xx> Commit Name <commit@email.xx>
53
54       which allows mailmap to replace both the name and the email of a commit
55       matching both the specified commit name and email address.
56
57       Example 1: Your history contains commits by two authors, Jane and Joe,
58       whose names appear in the repository under several forms:
59
60           Joe Developer <joe@example.com>
61           Joe R. Developer <joe@example.com>
62           Jane Doe <jane@example.com>
63           Jane Doe <jane@laptop.(none)>
64           Jane D. <jane@desktop.(none)>
65
66
67       Now suppose that Joe wants his middle name initial used, and Jane
68       prefers her family name fully spelled out. A proper .mailmap file would
69       look like:
70
71           Jane Doe         <jane@desktop.(none)>
72           Joe R. Developer <joe@example.com>
73
74
75       Note how there is no need for an entry for <jane@laptop.(none)>,
76       because the real name of that author is already correct.
77
78       Example 2: Your repository contains commits from the following authors:
79
80           nick1 <bugs@company.xx>
81           nick2 <bugs@company.xx>
82           nick2 <nick2@company.xx>
83           santa <me@company.xx>
84           claus <me@company.xx>
85           CTO <cto@coompany.xx>
86
87
88       Then you might want a .mailmap file that looks like:
89
90           <cto@company.xx>                       <cto@coompany.xx>
91           Some Dude <some@dude.xx>         nick1 <bugs@company.xx>
92           Other Author <other@author.xx>   nick2 <bugs@company.xx>
93           Other Author <other@author.xx>         <nick2@company.xx>
94           Santa Claus <santa.claus@northpole.xx> <me@company.xx>
95
96
97       Use hash # for comments that are either on their own line, or after the
98       email address.
99

GIT

101       Part of the git(1) suite
102
103
104
105Git 2.21.0                        02/24/2019              GIT-CHECK-MAILMAP(1)
Impressum