Our team has spent more than ten years growing social accounts, and every one of them gets judged on its visible trail. On GitHub that trail is the contribution graph, and when it looks wrong the cause is almost always a rule in GitHub's documentation. This page collects those rules in one place.
The graph shows a year of activity as one square per day
Each column is a week and each square a day, with a darker green for more contributions. Click a square to see what happened that day, and hold Shift to select a range. Below the graph, Activity overview and the Contribution activity timeline list the same events in order.
Since March 2023 the graph also works from the keyboard, and a screen reader hears it described as 54 columns and 8 rows of a year of user activity, with the arrows, Page Up, Page Down, Home, End and Enter to move around, per the GitHub changelog.
Only some activity makes a square, and two actions always do
Per the contributions reference, two actions always count: creating a repository and forking one. Everything else counts under conditions: a commit, an issue, a pull request, a pull request review, a discussion and a reply in a discussion. GitHub also caps how many issues, pull requests and discussions it shows in the graph.
For commits the conditions stack. All of these must be true.
- The email used for the commit is linked to your GitHub account.
- The commit was made in a standalone repository, not a fork.
- The commit was made on the default branch or on gh-pages.
And at least one of these as well: you are a collaborator on the repository or a member of the organization that owns it, you have forked the repository, or you have opened a pull request or an issue in it. Plain version: a commit with the right email on the main branch of a repository you are connected to counts, and a commit on a feature branch counts only after the merge.
Eight reasons for a missing square and the fix for each
| What you see | Likely cause | What to do |
|---|---|---|
| Commits exist, no squares | Commit email is not linked to your account | Add the email in Settings, Emails. The graph recalculates itself. |
| Work on a feature branch is missing | Not on the default branch or gh-pages | Merge to the default branch. Merging into another branch does not count. |
| Commits in a repository you copied | It is a fork | Open a pull request to the original repository. It counts once accepted into the default branch. |
| Commits in someone else's repository | No qualifying link to it | Become a collaborator, fork it, or open a pull request or an issue there. |
| You committed an hour ago | The graph has not caught up | Wait. GitHub says it can take up to 24 hours. |
| Private or organization work is missing | Private contributions are off by default | Turn on Private contributions in Contribution settings. |
| A square sits on the wrong day | Dates follow UTC, and sources differ on commit time zones | Compare the commit timestamp with the UTC date. |
| Count includes commits that no longer exist | History was rewritten, such as by a squash and force-push | Ask GitHub Support to rebuild the count. Updates can take up to 24 hours. |
Fix the first row before anything else. It is the most common one, and GitHub's troubleshooting page opens with it.
Check the email your commits use in two commands
Run git config user.email in the repository, then git config --global user.email to see the default. Compare the result with the list in Settings, Emails. If it is missing, add it there, and GitHub recounts old commits by itself, although new squares can take up to 24 hours. If you keep your email private, use the noreply address that GitHub shows in the same settings.
To read the email stored in any single commit, add .patch to the end of the commit address on GitHub. The first lines show the author line.
Private contributions need a switch, and visitors see counts only
By default the graph and your achievements reflect public repositories only. In Contribution settings you can include private activity. GitHub's 2016 announcement says that when it is switched on the contributions are completely anonymized: a visitor sees a number for the day, never a repository name or a message. So the switch costs no privacy for the work itself, and it helps if most of your work happens in a company repository.
The 24-hour delay and UTC explain squares on the wrong day
GitHub's documentation dates contributions in Coordinated Universal Time instead of your local zone. A second documentation page adds that a commit takes the time zone written in its timestamp, while a pull request or an issue takes the time zone of your browser. The two pages do not fully agree, so when a square looks a day off, compare the commit timestamp and the UTC date before you suspect a bug.
The delay is separate. GitHub says a qualifying commit can need up to 24 hours before it appears. If a square is still missing after a day, go back to the table above.
The streak counter was removed in 2016, so this is where to see a streak now
Years ago the profile showed a running count of consecutive days, the "don't break the chain" habit. In May 2016 GitHub's announcement said code streaks are no longer featured and described the simpler graph as focused on the work you do. Two ways remain to see one.
- Our GitHub Wrapped draws a Rhythm card with your longest run of active days and the number of active days for a chosen year. It reads public events, so it prints the first and last date it covered. GitHub's public events feed only reaches back about 90 days, so read that line before you trust the longest run.
- A streak card for a profile README counts the current and the longest run from your graph. Our README stats generator draws two cards you host yourself. Where cards go on the page is in the profile README guide.
Draw the graph outside GitHub with a CLI, an image or the API
If you want the graph in a terminal or on a page, community tools do it. gh-contribs is a GitHub CLI extension that prints the graph in the terminal. gitfetch is a Rust program that shows contributions beside system details. Some projects generate a graph image for a README, and a GitHub Actions comet animation is another variation. All of them read the same data you can query yourself through the GitHub GraphQL API.
Earn green squares with work GitHub counts
The graph records work, so the work comes first. The actions that count are a commit on the default branch, a pull request, a review, an issue and a discussion. A first pull request to a project you already use is a good start, and creating a repository and forking one count on their own. One repository where you push daily gives a darker graph than ten you touch once, and a graph that matches your real rhythm looks more credible than a flat block of green.
Reading the graph next to attention matters. If a project of yours has a steady graph but no stars, the next move is visibility. Get free followers from other developers, then see how the project reads with the profile checks in our profile analyzer. How to set the whole profile around the graph is in the good profile guide.
The repository graph and the profile graph answer different questions
| Profile contribution graph | Repository contributors graph | |
|---|---|---|
| Where | Your profile page | Repository, Insights, Contributors |
| Shows | Your activity across all repositories, one square per day | Who contributed to this repository |
| Limits | Conditions for each activity type | Top 100 contributors, merge commits and empty commits not counted |
| Large repositories | No size limit | Part of the data is unavailable above 10,000 commits |
People often look for their name in the repository graph and conclude commits are missing. The repository graph is a ranking of the top 100, so a small contribution may not show there while the square on your profile does. For stars, forks and watchers on the same repository, see stars vs forks vs watchers, and for the stars themselves see free GitHub stars.