Skip to main content

How GitHub counts contributions and handles time zones

Updated

Your GitHub contribution graph is more than a commit counter. It tracks several kinds of activity, but not every action automatically qualifies. Repository type, branch, account association and timestamps can all affect what appears on your profile.

If an activity happened near midnight, you might also notice that its date on GitHub differs from the date you expected. Understanding how GitHub calculates contribution dates makes these differences easier to explain.

1. What counts as a GitHub contribution?

According to GitHub's contribution rules, the following activities can appear on your profile:

  • Creating a repository: Creating a new repository counts as a contribution.
  • Forking a repository: Forking an existing repository also counts.
  • Opening issues: Eligible issues can appear on your contribution graph.
  • Proposing pull requests: Opening a pull request can count even before it is merged, provided it meets GitHub's eligibility rules.
  • Submitting reviews: Submitting a pull request review can count.
  • Discussions: Opening or answering an eligible discussion can count.
  • Making commits: Commits count only when they satisfy GitHub's repository, branch and email requirements.

2. Why commits in forks may not count

This is one of the most common reasons a commit does not appear on your contribution graph. GitHub distinguishes between standalone repositories and forks.

For a commit to count, all of the following conditions must be satisfied:

  • The email address used to author the commit must be associated with your GitHub account. Your GitHub-provided noreply address can also be used.
  • The commit must be made in a standalone repository, not directly in a fork.
  • The commit must be on the repository's default branch or its gh-pages branch.

At least one additional relationship must also apply: you are a repository collaborator or organization member, you have forked the repository, or you have opened an issue or pull request in that repository.

For example, committing to a feature branch in your fork does not automatically add those commits to your contribution graph. To receive contribution credit for commits made in a fork, open a pull request and have the changes merged into the parent repository.

Read GitHub's troubleshooting guide for missing contributions if your commits are not appearing.

3. Why issues and pull requests sometimes do not count

Opening an issue or proposing a pull request is not enough on its own. GitHub requires these activities to happen in a standalone repository rather than a fork.

  • Opening an issue in a standalone repository can count.
  • Proposing a pull request in a standalone repository can count, even if it has not been merged.
  • Submitting a pull request review can count when the activity meets GitHub's requirements.
  • Opening or answering a discussion can also count when eligible.

GitHub also limits how many issues, pull requests and discussions can be displayed on the contribution graph. Therefore, not every eligible activity will necessarily appear individually.

4. How GitHub calculates contribution dates

Time zones are an important reason why your contribution might appear on a different date than you expected. GitHub calculates event timestamps differently depending on the type of activity.

  • Commits: GitHub uses the time zone information in the commit timestamp. The author date determines when a commit appears on your profile.
  • Issues and pull requests opened on GitHub: GitHub uses your browser's time zone.
  • Issues and pull requests created through the API: GitHub uses the timestamp or time zone supplied in the API request.

This means two activities performed close to midnight can appear on different calendar dates. A commit made late at night may use the time zone recorded in Git, while an issue opened around the same time follows your browser's time zone.

5. Author date vs. commit date

Git stores two timestamps that are worth understanding:

  • Author date: When the commit was originally created.
  • Commit date: When the commit was last applied to the repository history.

These dates are usually identical. However, operations such as rebasing, amending or rewriting history can change the commit date without changing the original author date. GitHub uses the author date to determine when a commit appears on your profile.

6. What about private contributions?

GitHub normally displays public contributions on your profile. You can enable private contribution visibility to show activity from private repositories as well.

People who cannot access those repositories will see anonymized contribution counts, not private repository names, code or specific activity details.

You can manage this setting from your GitHub profile's contribution visibility settings.

7. Why a contribution might take time to appear

Even if an activity satisfies all the requirements, it might not appear immediately. GitHub notes that qualifying commits can take up to 24 hours to show on your contribution graph.

If an activity is missing, check these things:

  • Is your commit email associated with your GitHub account?
  • Was the commit made in a standalone repository?
  • Is it on the default branch or gh-pages?
  • Did you open the issue or pull request in a standalone repository?
  • Have you allowed enough time for GitHub to update the graph?

8. How DevTrack handles contribution days

GitHub determines whether an activity qualifies and supplies its contribution date. DevTrack uses your configured time zone in Settings when assigning activity to streak days. This is why your DevTrack streak date and the date you expected from your local clock may need to be checked separately.

Learn more about how GitHub streaks work and how DevTrack counts them, or visit your DevTrack profile to see your activity.

Quick answers

Do commits in a fork count toward GitHub contributions?
Commits made in a fork do not count directly toward your contribution graph. To receive credit, open a pull request and have your changes merged into the parent repository.
Do unmerged pull requests count as GitHub contributions?
Yes. Proposing a pull request can count if it is opened in a standalone repository rather than a fork and meets GitHub's eligibility requirements. It does not have to be merged.
Why does my GitHub commit appear on the wrong date?
GitHub uses the time zone information in the commit timestamp to calculate commit contribution dates. Issues and pull requests opened on GitHub use your browser's time zone, while API-created items use the supplied timestamp or time zone.
Does GitHub count commits made on feature branches?
Commits only count when they are on the repository's default branch or gh-pages branch. Commits on other branches do not count unless they become part of an eligible branch.
Do private GitHub contributions count?
Yes. You can enable private contribution visibility in your profile settings. Other people will see anonymized contribution counts without seeing your private repository names or code.
How long does GitHub take to update contributions?
Qualifying commits can take up to 24 hours to appear on your GitHub contribution graph.