Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

.mailmap in Bitbucket does not display corrected name

Charlie Misonne
Community Champion
August 7, 2026

Hi Community!

I'm testing git's .mailmap compatibility with Bitbucket Data Center and was unable to make it work so far. So I'm wondering if it is supported at all.

Does anyone know?

Let's say I pushed a commit with a wrong user.email in my .gitconfig

commit d2c818edeecb27101e9b87cc0eea07315756256e
Author: cmisonne <charlie.misonne.ext@example.wrong>
Date: Fri Aug 7 16:49:39 2026 +0200

This should be Charlie Misonne <charlie.misonne.ext@example.com>

with this in .mailmap I can fix it at the git level:

Charlie Misonne <charlie.misonne.ext@example.int> cmisonne <charlie.misonne.ext@example.wrong>

When performing git shortlog the wrong commit is displayed with the corrected name and email.

But in Bitbucket "cmisonne" is still the displayed name and the commits are not linked to my account.
Even the "verify commiter" hook does not seem to work with my .mailmap while the documentation says it should: https://confluence.atlassian.com/bitbucketserver094/using-repository-hooks-1489801800.html

1 answer

1 accepted

1 vote
Answer accepted
Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 8, 2026

Hi @Charlie Misonne, it's supported. The Git resources page in the same 9.4 space you linked says so outright, that .mailmap is useful "in Bitbucket Data Center repositories, to map multiple commit identities to the one Bitbucket user": https://confluence.atlassian.com/spaces/BITBUCKETSERVER094/pages/1489801691/Git+resources

Your mapping line is fine too, I dropped it into a throwaway repo and it maps. Bitbucket stores your repo bare though, and in a bare repo mailmap.blob defaults to HEAD:.mailmap, so the file the server reads is the one committed at the repo root on the default branch. shortlog reads the copy in your working tree. That's why it corrects whether or not the file is tracked, and why with nothing on HEAD the server still gets the raw author email, which is both of the things you're seeing: raw name, and an address no account holds.

So commit it at the repo root there and push it. The mapping gets applied at read time, so the commit you already pushed picks it up, no rewrite. To check whether that's your problem, from the clone you have: git fetch, then git show origin/main:.mailmap, swapping in whatever your default branch is. If that errors with "exists on disk, but not in origin/main", that's the whole thing. If it prints your mapping, placement is fine and the email is where I'd look next.

Careful with the local checks. check-mailmap, git log --format=%aN and even plain git log all correct off an untracked file, so none of them tell you whether it's committed.

On the email, BSERV-3235 is Bryan Turner saying a .mailmap is how you make user linking kick in when the commit email doesn't match the account, on the commit list, the single commit page and blame. Linking is on the address alone, so the canonical address on the left of your mapping has to be one a Bitbucket account holds. Yours reads example.int while the line above it says example.com. Probably an artefact of the anonymisation, but if the real file carries that mismatch you'd get the corrected name and still no link.

The hook reads the mailmap the same way, from that branch as it stood before your push, so if the file isn't already there it has no mapping to use, and one arriving in the same push can't help that push. Atlassian's KB on bypassing that hook has you push the file first and enable the hook after.

The git side of this I've reproduced myself. The Bitbucket side is that doc plus the ticket, and I couldn't find anything saying whether those screens rewrite the displayed name as well as the link, so I'd confirm that half on your own instance.

Charlie Misonne
Community Champion
August 10, 2026

Hi @Gabriela - LeanZero 

The .mailmap file is in the root of the repository already but I was testing on a feature branch.
Once I merged to the master branch it worked! I can now see the corrected names in Bitbucket.
Thanks for the help! I really appreciate your detailed answer.

The .com/.int thing was an anonymization mistake indeed. Sorry for that!

Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 11, 2026

Nothing I found stated whether those screens rewrite the displayed name or only the linking, so your result closes that half of it. The branch is easy to miss as well, every local check corrects off the working tree copy whatever the server has. And no problem on the .int, it read like anonymisation from here.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.17
TAGS
AUG Leaders

Atlassian Community Events