Decoding GitHub Contribution Graphs: Why Your Commits Might Not Be Showing (and How to Fix It)

A GitHub contribution graph with a magnifying glass highlighting a missing commit.
A GitHub contribution graph with a magnifying glass highlighting a missing commit.

The Case of the Missing Commits: Author Date vs. Committer Date

The GitHub contribution graph is a widely recognized visual representation of a developer's activity and a key indicator when considering how to measure developer productivity. So, when your hard-earned commits mysteriously vanish from this digital ledger, it can be a source of significant frustration. Our community recently tackled a common scenario where public repository commits, despite being correctly attributed in the repository, failed to appear on the user's contribution calendar.

The core of the issue often boils down to a subtle but critical distinction in Git: the author date versus the committer date. While many developers are familiar with the concept of commit timestamps, it's crucial to understand which one GitHub's contribution graph prioritizes.

When you use commands like git commit --amend or perform an interactive rebase (git rebase -i), Git typically updates the committer date to the current time, reflecting when the commit was last modified or applied to the branch. However, it often preserves the original author date, which indicates when the commit was first created by the original author. GitHub's contribution graph relies on the author date. If your rebase operation inadvertently preserved an older author date, your contribution will appear on that past date on your graph, not on the day you pushed it.

To verify this, you can inspect both dates for a specific commit using:

git log -1 --format="Author: %ad%nCommitter: %cd" 

If the author date is in the past, that's likely your answer. While it might be tempting to rewrite history again, remember that this is primarily a cosmetic issue for the graph; the commit itself is valid.

Visual representation of Git author date versus committer date on a timeline.
Visual representation of Git author date versus committer date on a timeline.

Beyond Dates: Other Common Troubleshooting Steps

Even if the author date isn't the culprit, several other factors can prevent your contributions from appearing. Here's a comprehensive checklist:

  • Caching Delay: GitHub's contribution graph can take 24-48 hours to refresh, especially after force pushes or significant history rewrites. Patience is key.
  • Default Branch Only: Only commits to the repository's default branch (e.g., main or master) count towards your public contribution graph. Commits to feature branches or non-default branches do not.
  • Email Matching: Your commit email must exactly match a verified email associated with your GitHub account. GitHub is case-sensitive for email matching, so sarasstha5@gmail.com is different from Sarasstha5@gmail.com. Verify this with git log --format="%an %ae" in your repository.
  • Contribution Graph Timeframe: The contribution graph typically displays activity for the past 12 months. If your commit's author date is older than this, it won't appear.
  • Repository Visibility: Only commits to public repositories count towards your public contribution graph. Private repository contributions are not shown publicly.
  • Verify via GitHub API: You can check if GitHub recognizes your contributions to a specific repository by visiting the contributors graph URL (e.g., https://github.com/your-username/your-repo/graphs/contributors). If your username appears here, GitHub is tracking the commits, and it's likely a caching or display issue.
  • Make a Test Commit: If all else fails, try making a small, fresh commit directly to your default branch. If this new commit appears, it further isolates the issue to the specific older commits and their timestamps.

When to Contact Support

If you've exhausted all these troubleshooting steps, verified your commit dates, email, branch, and visibility, and waited a reasonable period, it might be time to contact GitHub Support. Provide them with your GitHub username, repository URL, the specific commit hash, and any relevant screenshots or details you've gathered. They can investigate potential issues with your contribution data or indexing.

Understanding these nuances is vital for developers who rely on their GitHub profiles to showcase their work and for organizations looking at how to measure developer productivity through visible activity. While the contribution graph is a useful metric, remember it's just one piece of a larger puzzle.

|

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

 Install GitHub App to Start
Dashboard with engineering activity trends