7

Last month I made lots of commits to my master branch but I realised I didnt have my email address added to my local git config settings. Now that I added my email address my contributions are still not showing up in the graph. Only the new commits are showing up in the contributions, but the old commits (prior to adding my email address) are not showing up.

My impression is that they should show up because when you add your email address the contribution graph will be rebuilt automatically according to this statement from Git:

"If the email address used for the commit hasn't been added to your GitHub profile, you must add the email address to your GitHub account. Your contributions graph will be rebuilt automatically when you add the new address."

How do I fix this?

Thanks

D. Ace
  • 398
  • 4
  • 9
  • 25
  • Your previous commits didn't have an email address associated with them so GitHub doesn't know they belong to you. – houtanb Dec 16 '15 at 09:43
  • thanks for the reply, I wonder is there any way to get my previous commits to show up in the contributions? – D. Ace Dec 16 '15 at 09:45
  • You would have to rewrite the history of the git repository. So, in short, no. Anyway, in one year, it won't matter because the graph keeps on moving :) – houtanb Dec 16 '15 at 10:11
  • thanks. so the answer is No, I cannot get them to show up unless i rewrite the history? – D. Ace Dec 16 '15 at 10:32
  • Yes, I believe so. One way to be certain would be to follow the instructions on [this page](https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/#you-havent-added-your-local-git-commit-email-to-your-profile). Basically, navigate to a commit that you made before updating your config and add `.patch` to the URL. Does your email address appear or not? If not, then the only way to do this would be to rewrite the git history. – houtanb Dec 16 '15 at 10:38
  • i tried that. nope. my email address does not appear – D. Ace Dec 16 '15 at 21:14

4 Answers4

3

This is a problem with GitHub. Have you been removed from the repository?

This has happen to me before where the last company I was at and all the commits I had added to the repository were no longer showing up after I swapped companies and was removed from the companies repository. All my history was removed from the graph aswell basically saying I did nothing for that entire period.

Tomaltach
  • 913
  • 1
  • 11
  • 30
  • 3
    thanks for the reply, nope I havent been removed from the repo. The main problem was I didnt have my email address setup with my previous commit. so now that I have it setup how do I get my previous commit to show up in the contributions graph? – D. Ace Dec 16 '15 at 09:52
  • 1
    @D.Ace I am having this issue too. Were you able to figure it out? – buydadip Mar 27 '17 at 14:24
0

Git keeps track of the history of a project's development. Thus, if you committed and pushed changes to the main repository before having configured your email address locally, those commits will not contain the identifying information that GitHub uses to create their contributions graph.

To see whether or not these commits contain your email address, add .patch to the GitHub URL of the commit, as explained here. If you do not see an email address in the output, then the only way to add email information (and thus to have your GitHub contributions graph populated with this commit) is to rewrite the git history (i.e. by using git push --force). NB this is NOT recommended, especially if other people use this repository.

houtanb
  • 3,852
  • 20
  • 21
0

My problem was not exactly same, I have deleted old email address that I used to for prior commits for other company repository. I have added this old email back to github and verified it, my previous commits were restored in the contributions graph.

atazmin
  • 4,757
  • 1
  • 32
  • 23
0

Seems like you need to contact GitHub Support and ask them to manually rebuild your contribution graph

Asaf Mesika
  • 1,643
  • 4
  • 20
  • 33