Lost Commit History After Email Recovery – Need Help #162769
-
|
Hello GitHub Community! I hope you're all doing well. I’m reaching out because I noticed that a big part of my commit history has disappeared, and I’m really hoping someone here might have some insight or advice. Some time ago, I was the victim of a hacking incident and lost access to my main email account for about a month. During that time, as a safety measure, I unlinked that email from my GitHub account and added another one. After doing that, I realized my commit history had dropped significantly — I used to have around 400 commits, and now I see only about 160. I understand that commit history is tied to the email associated with each commit, so after I managed to recover my original email, I added it back to my GitHub account expecting the history to return. Unfortunately, it didn’t. I know 400 commits isn’t a huge number, but I'm just getting started in the tech field and working towards landing my first junior developer role — and having a consistent and growing commit history can make a difference when showcasing my progress and dedication. Has anyone been through something similar? Or does anyone know if there’s a way to restore the missing commits once the original email is re-added? Thanks in advance for any help or tips you can share! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Yeah, I’ve seen this kind of thing happen before, and you’re spot on — GitHub links commits to your account based on the email address in the commit metadata. If that email isn’t verified and tied to your profile, those commits won’t show up on your contribution graph. Since you’ve already re-added the old email, the first thing I’d check is whether it’s actually verified again. Just having it listed isn’t enough — it needs to be confirmed through the email link GitHub sends. Another thing worth checking: are you sure the commits were made using that exact email? Sometimes Git gets configured with a different one — you can run this to double-check: git log --pretty=format:'%ae' | sort | uniq Also worth noting: if those commits were in private repos, make sure “Show private contributions on my profile” is turned on in your GitHub settings — otherwise they’ll be hidden. And lastly — if the repos themselves are gone or you’ve lost access to them, that’ll affect the graph too. If you’ve gone through all that and it still looks off, I’d say raise a support ticket. Might take a bit for them to get back, but if you include the old email and a few example commit hashes, they can sometimes force a reindex or at least let you know what’s going on behind the scenes. Best of luck, mate. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @devluish, did @sonlqt's answer here help? If not, the best place to go for answers to account-specific questions like this one is opening a ticket on our Support page. Please open a ticket with them :) |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the help! I tried a few alternatives within GitHub's settings but had no success, so I contacted support. In just 30 minutes, they resolved everything clearly and efficiently. I really appreciate the response and the detailed explanation — it's great to get this kind of support from the community! Special thanks to @sonlqt and @ghostinhershell thx |
Beta Was this translation helpful? Give feedback.

Yeah, I’ve seen this kind of thing happen before, and you’re spot on — GitHub links commits to your account based on the email address in the commit metadata. If that email isn’t verified and tied to your profile, those commits won’t show up on your contribution graph.
Since you’ve already re-added the old email, the first thing I’d check is whether it’s actually verified again. Just having it listed isn’t enough — it needs to be confirmed through the email link GitHub sends.
Another thing worth checking: are you sure the commits were made using that exact email? Sometimes Git gets configured with a different one — you can run this to double-check:
git log --pretty=format:'%ae' | sort | uniq