11

Have got a git repo with incorrect contributors and their contributions. Repo has few commit's from different emails and alias name and we have added .mailmap to resolve this issue.

Shortlog recognizes .mailmap and groups contributions accordingly, but it doesn't reflect on GitHub. Does GitHub consider .mailmap file or should we have to wait for GitHub re-run the graph.

git shortlog -sne

Note: We have waited for 24 hours already

Yves M.
  • 29,855
  • 23
  • 108
  • 144
MusicMan
  • 914
  • 1
  • 7
  • 18
  • [Yes, github consider .mailmap file](https://github.com/git/git/blob/master/Documentation/mailmap.txt) – Andreas Dec 05 '18 at 09:38
  • @Andreas yes git considers, and shortlog is the proof. Need to know about github considers as well ? The link points git repo that is hosted on github, so i am considering it as git documentation and not github's. – MusicMan Dec 05 '18 at 09:40
  • Did it ever start working for you? I'm curious if it works as well. I can find no evidence that it actually works. – donatJ Jan 09 '20 at 17:42
  • @donatJ Yes, it worked for us. – MusicMan Apr 04 '20 at 03:56

1 Answers1

6

Github considers .mailmap file for contributions and it takes time to update contributors graph and pulse (in our case it was 24 - 36 hours )

MusicMan
  • 914
  • 1
  • 7
  • 18
  • 1
    I have not been able to get this working, despite waiting several days. Are you willing to post a link to the repository where you got `.mailmap` to be reflected in the Contributors graph? – Jim Garrison Jul 15 '20 at 18:21
  • 1
    It was in a enterprise github installation with restricted access. – MusicMan Jul 16 '20 at 06:03
  • 1
    @MusicMan this [Github Community post](https://github.community/t/how-to-get-mailmap-to-work-and-record-contributions-in-relevant-users-profile/121285) from July 2020 says that "GitHub does not support using mailmap files" and "The only way to update the contributor details in your commits is to rewrite git history". I just pushed up a .mailmap file to my Github Enterprise Server repo and will update here if my contribution graph is corrected. – raychz Aug 20 '20 at 06:30
  • In my case contribution graph was fixed. Not sure if this is a recent development / fix. – MusicMan Aug 24 '20 at 12:33
  • Hmm, strange. It's been 4 days since pushing up the .mailmap and our Github Enterprise Server repo is still not showing a fixed contribution graph. – raychz Aug 24 '20 at 19:03
  • @raychz Did this ever end up working for you? – dmgig May 09 '22 at 22:41
  • 1
    Doesn't work for me either. The only thing that works for me is adding the email addresses of the commits that aren't recognized under `Settings/Emails`. – gignu May 27 '22 at 00:51