What counts as a contribution on GitHub?

Your GitHub contribution graph — the wall of green squares on your profile — only counts specific activities, and only under specific conditions. If you've ever pushed a day of work and watched the square stay gray, this is why.
What lights up a square
GitHub counts four kinds of activity as contributions:
- Commits — but only when they're made to a repository's default
branch (usually
main) or itsgh-pagesbranch. - Opening an issue in any repository.
- Opening a pull request in any repository.
- Submitting a pull request review.
Each of these adds to the count for the day it happened — in your profile's timezone, which matters more than people think (more below).
Why your work sometimes doesn't show up
The classic reasons a productive day leaves no trace:
- You committed to a feature branch. Commits count only once they're on
the default branch. A week of work on
feature/big-refactorshows up as a single day — the day the PR merges (and only the commits, on their original author dates, once merged). - Your commit email doesn't match your account. GitHub links commits to
you by the email in the commit metadata. If your
git config user.emailis your work address and it isn't added to your GitHub account, those commits belong to no one. Check withgit config user.emailand add any missing addresses in GitHub → Settings → Emails. - The repository is a fork. Commits to forks don't count unless the work ends up in the upstream repo via a merged PR (or the fork is detached into a standalone repository).
- Private repository activity is hidden. Private contributions are counted only if you enable "Private contributions" in your profile's contribution settings — otherwise viewers see gray where your real work happened.
- The timezone boundary. A commit at 11:30 PM your time can land on "tomorrow's" square (or yesterday's) if your profile timezone doesn't match where you actually work.
What deliberately doesn't count
Commits made through rebases that rewrite dates, commits to non-default branches that never merge, gists, and starring or watching repositories don't move the graph. Wiki edits stopped counting years ago.
Keeping the graph honest — and green
The graph rewards a very specific shape of work: small, regular, on the default branch, with the right email. Plenty of excellent engineers have patchy graphs because their real work lives in feature branches, private repos, or code review.
If a consistent graph matters to you — recruiters do look at it — the fixes are: merge small PRs often, verify your commit email, enable private contributions, and commit in your own timezone. And for the repos where you want steady activity without babysitting them, GitShine keeps your contribution graph green with scheduled commits on repositories you choose, timed to your own rhythm — free for everyone.
