GitHub repository still shows Claude as a contributor after force-pushing rewritten history #210496
Replies: 6 comments
|
Hi, this can happen because GitHub may cache contributor information separately from the Insights → Contributors graph. I would first verify the author and committer emails in the current default branch and check for any Has anyone confirmed how long GitHub typically takes to refresh this contributor data? |
|
Hi @TejasriKanchu, this may be a GitHub contributor cache issue. Since I would recommend:
Since the Insights graph already shows only your account, I would avoid rewriting the Git history again. Another force-push is unlikely to help if the remaining discrepancy is only in GitHub's displayed contributor information. |
Here is a direct answer tailored for that GitHub Discussion: This is a known indexing latency issue with GitHub's repository metadata cache. When you rewrite Git history using tools like git filter-repo or BFG Repo-Cleaner and force-push (git push --force), GitHub updates the repository tree immediately, but the Contributors list on the repository sidebar is cached separately and relies on background queue processing to update. Here is why this occurs and how to safely force GitHub to refresh the sidebar:
Sidebar Contributors Widget uses a cached background counter that tracks all commit author emails ever pushed to the default branch—including orphaned/dangling commits that haven't been garbage collected yet by GitHub's servers.
Trigger an Empty Commit: Push a dummy commit directly to your default branch to force GitHub's cache parser to re-index the repository metadata: Bash Wait for GitHub's Garbage Collection: If the dummy commit doesn't clear it immediately, GitHub's internal backend garbage collection usually purges orphaned commit references within 24–48 hours. If this response helps resolve the indexing discrepancy, please mark it as the accepted answer! |
|
Here is a direct answer tailored for that GitHub Discussion: This is a known indexing latency issue with GitHub's repository metadata cache. When you rewrite Git history using tools like git filter-repo or BFG Repo-Cleaner and force-push (git push --force), GitHub updates the repository tree immediately, but the Contributors list on the repository sidebar is cached separately and relies on background queue processing to update. Here is why this occurs and how to safely force GitHub to refresh the sidebar:
Sidebar Contributors Widget uses a cached background counter that tracks all commit author emails ever pushed to the default branch—including orphaned/dangling commits that haven't been garbage collected yet by GitHub's servers.
Trigger an Empty Commit: Push a dummy commit directly to your default branch to force GitHub's cache parser to re-index the repository metadata: Bash Wait for GitHub's Garbage Collection: If the dummy commit doesn't clear it immediately, GitHub's internal backend garbage collection usually purges orphaned commit references within 24–48 hours. If this response helps resolve the indexing discrepancy, please mark it as the accepted answer! |
|
Hi @TejasriKanchu, This is most likely one of two things: a leftover trailer your search missed, or a stale cache.
git log --grep is case-sensitive by default. Claude Code adds a trailer like Co-Authored-By: Claude noreply@anthropic.com (capital A and B), so a search for Co-authored-by can miss it. Search case-insensitively and by email too: GitHub counts Co-authored-by trailers, matched by email, as contributions to the repo’s contributor list. A single remaining trailer on any commit in the default branch history is enough to keep Claude listed.
The Contributors list in the repo sidebar is computed in the background and cached. It doesn’t always refresh right after a force-push. The Insights → Contributors graph uses a different calculation, which explains why the two disagree. To see what GitHub actually has: If claude still appears in the API output, run the case-insensitive search above. Some commit still references it. Refreshing it without rewriting history Push a normal new commit to main (even a small README edit). This often triggers a recalculation. Old commits can also remain reachable by SHA, or through pull request refs, until GitHub garbage-collects them. They don’t affect the default-branch contributor list, but Support can purge them if needed. Hope this helps! If it does, please mark it as the answer. |
|
One fix that has worked for others: rename the default branch away and back, not the repository. In #210296, @JoshPola96 reports that it cleared a stale contributor from the sidebar, with credit to #197389: If the repository has pull requests, check To check what the branch itself still credits: I maintain surviving-lines, and |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Other
Body
Hello GitHub Community,
My repository still shows
claudeas a contributor on its main page, even after I rewrote the Git history and force-pushed on October 15, 2026.Repository: https://github.com/TejasriKanchu/employee-management-system
I checked the commits on
origin/main. All commits show my name,TejasriKanchu, as the author and committer. I also searched the commit messages forCo-authored-by,Claude, andanthropic, but found no matches.The Insights → Contributors graph shows only my account, but the repository's main page still lists Claude as a contributor.
Has anyone experienced this discrepancy? Is there a way to refresh the contributor list safely without rewriting the Git history again?
Thank you!
All reactions