GitHub Contributor Statistics Not Updating? A Workaround for Stubborn Analytics

Even after meticulously rewriting repository history to remove a contributor's commits, their name can stubbornly linger in GitHub's "Contributors" section. This common frustration highlights a nuance in how GitHub tracks repository statistics and can be a head-scratcher for developers aiming for clean repository analytics.

Developer frustrated by persistent contributor in GitHub statistics dashboard.
Developer frustrated by persistent contributor in GitHub statistics dashboard.

The Problem: Persistent Contributors in GitHub Statistics

A recent discussion on GitHub's community forum, initiated by FouziaAhmedReya, brought this issue to light. After removing all commits authored by a specific individual from the default main branch and waiting over 24 hours, the contributor still appeared in the repository’s “Contributors” section. While filtering the commit history correctly showed “No commits history” for the removed contributor, the summary statistics remained unchanged. This led to the question: Is there a way to refresh or rebuild GitHub's cached contributor statistics?

Visualizing the creation of a new repository for clean GitHub analytics.
Visualizing the creation of a new repository for clean GitHub analytics.

Why GitHub's Contributor Analytics Don't Always Update

As clarified by community member paul-saac, GitHub’s Contributors widget doesn't track the "current state" of your repository in real-time after history rewrites; instead, it tracks the entire commit history. This means that even if you use tools like git filter-branch or git rebase to rewrite history and remove a contributor’s commits, their name might still be "baked into" the historical data that GitHub uses to populate the Contributors section. GitHub doesn't offer a direct "edit contributors" or "refresh statistics" button for existing repositories, making retroactive changes to this particular dashboard metric challenging.

The Workaround: A Fresh Start for Repository Analytics

While there isn't a direct way to force a refresh on an existing repository's contributor list, community members lucaasporto and paul-saac converged on an effective workaround: creating a new repository.

Steps for a Clean Contributor List:

  • Create a New Repository: Initialize a brand new, empty repository on GitHub.
  • Clone Your Old Repository Locally:
    git clone 
  • Clean Your Local History (if necessary): If you haven't already, ensure your local clone has the desired clean history (e.g., with the unwanted contributor's commits removed). This might involve a local git rebase or git filter-branch, though the primary advice is to ensure the current state of your code is what you want.
  • Push Content to the New Repository:
    cd 
    git remote set-url origin 
    git push -u origin --all
    git push -u origin --tags

    Alternatively, you can manually copy the clean files into a new local Git repository and push that to the new GitHub repo.

By pushing the clean content to a new repository, the Contributors widget starts from scratch, accurately reflecting only the authors present in the newly pushed commit history. This method avoids fighting with Git internals to strip co-author tags retroactively from an existing repository's cached statistics.

Important Considerations

This workaround is a "start clean" move, not a "repair" for the original repository. It's ideal if you don't need to preserve the original repository's star count, issues, pull requests, or other associated data. Rewriting history on an active repository can be disruptive for other collaborators, so a fresh repository provides a cleaner break for updating your git dashboard tools and github analytics.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends