diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/git/gitmailmap.html | |
new repository
Diffstat (limited to 'devdocs/git/gitmailmap.html')
| -rw-r--r-- | devdocs/git/gitmailmap.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/devdocs/git/gitmailmap.html b/devdocs/git/gitmailmap.html new file mode 100644 index 00000000..79d9a9ef --- /dev/null +++ b/devdocs/git/gitmailmap.html @@ -0,0 +1,19 @@ +<h1>gitmailmap</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>gitmailmap - Map author/committer names and/or E-Mail addresses</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <p>$GIT_WORK_TREE/.mailmap</p> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p>If the file <code>.mailmap</code> exists at the toplevel of the repository, or at the location pointed to by the <code>mailmap.file</code> or <code>mailmap.blob</code> configuration options (see <a href="git-config">git-config[1]</a>), it is used to map author and committer names and email addresses to canonical real names and email addresses.</p> </div> <h2 id="_syntax">Syntax</h2> <div class="sectionbody"> <p>The <code>#</code> character begins a comment to the end of line, blank lines are ignored.</p> <p>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 <code><</code> and <code>></code>) to map to the name. For example:</p> <div class="openblock"> <div class="content"> <div class="literalblock"> <div class="content"> <pre>Proper Name <commit@email.xx></pre> </div> </div> </div> </div> <p>The more complex forms are:</p> <div class="openblock"> <div class="content"> <div class="literalblock"> <div class="content"> <pre><proper@email.xx> <commit@email.xx></pre> </div> </div> </div> </div> <p>which allows mailmap to replace only the email part of a commit, and:</p> <div class="openblock"> <div class="content"> <div class="literalblock"> <div class="content"> <pre>Proper Name <proper@email.xx> <commit@email.xx></pre> </div> </div> </div> </div> <p>which allows mailmap to replace both the name and the email of a commit matching the specified commit email address, and:</p> <div class="openblock"> <div class="content"> <div class="literalblock"> <div class="content"> <pre>Proper Name <proper@email.xx> Commit Name <commit@email.xx></pre> </div> </div> </div> </div> <p>which allows mailmap to replace both the name and the email of a commit matching both the specified commit name and email address.</p> <p>Both E-Mails and names are matched case-insensitively. For example this would also match the <code>Commit Name <commit@email.xx></code> above:</p> <div class="openblock"> <div class="content"> <div class="literalblock"> <div class="content"> <pre>Proper Name <proper@email.xx> CoMmIt NaMe <CoMmIt@EmAiL.xX></pre> </div> </div> </div> </div> </div> <h2 id="_notes">Notes</h2> <div class="sectionbody"> <p>Git does not follow symbolic links when accessing a <code>.mailmap</code> file in the working tree. This keeps behavior consistent when the file is accessed from the index or a tree versus from the filesystem.</p> </div> <h2 id="_examples">Examples</h2> <div class="sectionbody"> <p>Your history contains commits by two authors, Jane and Joe, whose names appear in the repository under several forms:</p> <div class="listingblock"> <div class="content"> <pre>Joe Developer <joe@example.com> +Joe R. Developer <joe@example.com> +Jane Doe <jane@example.com> +Jane Doe <jane@laptop.(none)> +Jane D. <jane@desktop.(none)></pre> </div> </div> <p>Now suppose that Joe wants his middle name initial used, and Jane prefers her family name fully spelled out. A <code>.mailmap</code> file to correct the names would look like:</p> <div class="listingblock"> <div class="content"> <pre>Joe R. Developer <joe@example.com> +Jane Doe <jane@example.com> +Jane Doe <jane@desktop.(none)></pre> </div> </div> <p>Note that there’s no need to map the name for <code><jane@laptop.(none)></code> to only correct the names. However, leaving the obviously broken <code><jane@laptop.(none)></code> and <code><jane@desktop.(none)></code> E-Mails as-is is usually not what you want. A <code>.mailmap</code> file which also corrects those is:</p> <div class="listingblock"> <div class="content"> <pre>Joe R. Developer <joe@example.com> +Jane Doe <jane@example.com> <jane@laptop.(none)> +Jane Doe <jane@example.com> <jane@desktop.(none)></pre> </div> </div> <p>Finally, let’s 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:</p> <div class="listingblock"> <div class="content"> <pre>Joe <bugs@example.com> +Jane <bugs@example.com></pre> </div> </div> <p>A full <code>.mailmap</code> file which also handles those cases (an addition of two lines to the above example) would be:</p> <div class="listingblock"> <div class="content"> <pre>Joe R. Developer <joe@example.com> +Jane Doe <jane@example.com> <jane@laptop.(none)> +Jane Doe <jane@example.com> <jane@desktop.(none)> +Joe R. Developer <joe@example.com> Joe <bugs@example.com> +Jane Doe <jane@example.com> Jane <bugs@example.com></pre> </div> </div> </div> <h2 id="_see_also">See also</h2> <div class="sectionbody"> <p><a href="git-check-mailmap">git-check-mailmap[1]</a></p> </div><div class="_attribution"> + <p class="_attribution-p"> + © 2012–2024 Scott Chacon and others<br>Licensed under the MIT License.<br> + <a href="https://git-scm.com/docs/gitmailmap" class="_attribution-link">https://git-scm.com/docs/gitmailmap</a> + </p> +</div> |
