Home > database >  Recover past contributions on git that did not have a correct mail linked
Recover past contributions on git that did not have a correct mail linked

Time:03-17

This issue is related with my contributions to a specific project that I have invested quite a bit of time on git.

I have linked my mail on git with my global options and now the commits are recognized. However, what I'm afraid is that I cannot recover my past contributions which are a lot.

I have seen several answers with this related topic but no clear answers of how to assign the past contributions to my account that that did not have a verified mail associated and just a local one for what it seems [email protected]. Is it possible?

These are two related answers but they didn't help me to solve it (one of them says that is not possible):

git contribution global email Git contributions not showing up on GitHub

CodePudding user response:

If I understand you correctly, then you can replace the associated email in each commit.

See this answer for a script that will do exactly this: https://stackoverflow.com/a/34851024

Note that you will then need to force push: git push -f But also note that this may cause issues for other people if they cloned your project.

  •  Tags:  
  • r git
  • Related