.mailmap (Git) Generator
Map inconsistent names and emails to a single author in Git, improving stats and shortlog. Official format.
.mailmap:
—
.mailmap: one person, several emails, a single name
Anyone contributing for years accumulates identities: the personal email from the early days, the corporate one later, the domainless GitHub address, the name spelled three different ways. In repository statistics that becomes one person counted four times, each holding a slice of the commits. The .mailmap fixes it in the presentation, without touching a single commit.
Paste the mappings and the page validates each line and normalises the spacing. Four forms are accepted, all running from what you want shown to what is recorded in the commit: name only; email only; name and email corrected from the old email; and the full form, which matches old name and email at the same time. A malformed line is flagged with the reason rather than slipping through.
It matters to know where the file acts and where it does not. It is read by git shortlog, git log, git blame and by statistics tools — presentation changes. The commit objects keep their original data, and hashes do not change. Save it as .mailmap in the root and commit it: unlike the blame configuration, this file travels with the repository and applies to everyone automatically.
Frequently asked questions
Why did Git ignore my line?
What order do the parts go in?
Does it work on GitHub?
Related Tools
.gitignore Generator
Generate a .gitignore by combining language/IDE templates — Node, Python, Java, Go, Rust, .DS_Store, JetBrains, VSCode etc. Everything in your browser.
Git Merge Conflict Resolver
Splits a file with Git conflict markers into ours and theirs versions, lets you pick a side per hunk and outputs the resolved file.
.gitattributes Generator
Generate .gitattributes to normalize line endings, mark binaries, configure diff and override GitHub linguist language stats.
Git Aliases Generator
Useful git aliases (st, co, br, lg, undo, save, wip, amend, hist) ready to paste into .gitconfig.
.git-blame-ignore-revs Generator
List of commit hashes for Git to ignore in blame (mass formatters: prettier, black, eslint --fix). Useful for large refactors.
Git Cheatsheet
Searchable list of the most-used git commands — config, commit, branch, merge, rebase, stash, log, remote, reset. With copyable examples. Everything in your browser.