GitHub contribution graph showing stale green dots after force push #214174
Replies: 3 comments
|
A few things to check: 1. Make sure the squares come from that repo's commits. 2. Commits only count while they're on the default branch (or 3. Stale data
Note: if those commits also exist in someone else's repo (for example a fork or a copy someone pushed), they'll keep counting, because that history isn't under your control. Reference: Why are my contributions not showing up on my profile? |
|
There’s no manual refresh for the contribution graph. A force-push updates the branch immediately, but GitHub recalculates profile contributions separately. For one of the affected dates, click the square and look specifically for commits in If the entry is a commit, the Code tab only shows the selected branch. With an old commit SHA, you can check which remote branches and tags still contain it: git fetch origin --prune --tags
git branch -r --contains <old-sha>
git tag --contains <old-sha>The distinction here is reachability vs. contribution eligibility: another branch, a tag, or a PR ref can keep an old commit accessible, but that alone doesn’t make it count. For commit contributions, check whether the SHA is still on the default branch or Recalculation can take longer than 24 hours. If the activity still explicitly lists those commits after several days and they’re off both eligible branches, contact GitHub Support with the affected dates, repository URL, and an example SHA. Only Support can investigate a stuck graph and trigger a recache if needed. Deleting the repository would remove its commit contributions after recalculation, but that’s destructive and unnecessary just to request a refresh. |
|
There is one, and it is a bit odd. Your repo is clean, the graph just has not been recalculated, and waiting another day will not necessarily do it. Changing the default branch forces GitHub to recount, so rename main to main-tmp and straight back:
Do not push anything between the two renames, and give the profile a few minutes after. The same rename in the web UI works too. Do not delete the repo to fix this, that is the nuclear option and it costs you the history, the releases and the watchers for no reason. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Code Search and Navigation
Body
Hello GitHub Community,
I rewrote my repository history using git reset --hard and successfully force-pushed the changes.
My repository now shows zero commits, but my GitHub profile still displays the old green contribution squares.
It has been more than 24 hours, but the contribution graph has not updated.
Is there any way to rebuild or refresh my stale contribution data so that the old green squares disappear?
Repository: https://github.com/vishal-buchadi/E_Commerce
I would appreciate your help.
Thank you!
All reactions