Contribution graph still shows old counts after history rewrite #213261
Replies: 3 comments
|
Hi DBinK, This sounds like a stale contribution count after rewriting Git history. According to GitHub's official documentation, when you squash commits or force-push rewritten history, your profile may continue counting commits that are no longer present in the repository's visible history. This can also happen with private repositories. Here's what I'd recommend:
GitHub Support may be able to rebuild the contribution data, depending on the support options available to your account. After a rebuild, allow up to 24 hours for your profile's contribution graph and activity summary to refresh. Official documentation: Hope this helps! |
|
Adding a couple of things to the reply above. If you just want the spike hidden while you wait, you can turn off "Private contributions" in Contribution settings on your profile. The downside is that it hides all your private activity, not just that repo, but you can turn it back on later. For the actual fix, Support is the only way I know of. The portal is help.github.com now. It probably helps to point them to the "Contribution counts are stale after rewriting history" section of this doc, and include the repo name, when you force-pushed, and the dates that look wrong. One thing to check first: commits on a I wouldn't force-push again either. Someone had a similar case in #212589, and the old commits stayed counted even though the repo had no other branches or tags. |
|
One more thing worth trying before (or while) waiting on Support. In GitHub's pinned thread (https://github.com/orgs/community/discussions/209302), kunalx731 had the exact same issue: superseded commits were still counted after a force-push. Briefly switching the default branch got the profile recounted within about a minute:
Nothing gets renamed and no history changes, so no need for another force-push. The exact |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Profile
Body
Hi, I accidentally generated many frequent commits in a private repository. I have since rewritten the repository history and force-pushed it, but my contribution graph still shows the old counts.
Could someone help me recalculate my contribution data, or let me know how to request this?
Profile: https://github.com/DBinK
Thank you!
All reactions