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

DESCRIPTION

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

OPTIONS

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

OUTPUT

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

MAPPING AUTHORS

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

GIT

96       Part of the git(1) suite
97
98
99
100Git 2.26.2                        2020-04-20              GIT-CHECK-MAILMAP(1)
Impressum