Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How are commits counted by the GitHub contributions graph?

Tags:

git

github

How are contributions in the GitHub Contributions graph on my profile counted? (The one with the green dots.) Does whether a commit is counted or not depend on the username in the commit, or the email associated with it?

Please provide details. Is there any way I can associate commits with my username but change my email and still have the green dots appear?

like image 965
squiroid Avatar asked Mar 27 '15 08:03

squiroid


People also ask

What counts as commits on GitHub?

On your profile page, certain actions count as contributions: Committing to a repository's default branch or gh-pages branch. Opening an issue. Opening a discussion.

Does GitHub count contributions to private repos?

We think including your work in private repositories is a more accurate representation of your contributions, but your privacy is important too. Private contributions are not shown by default and, when enabled, are completely anonymized to the general public.

How do you see who contributed the most on GitHub?

You can view the top 100 contributors to a repository in the contributors graph. Merge commits and empty commits aren't counted as contributions for this graph. You can also see a list of people who have contributed to the project's Python dependencies.


2 Answers

GitHub has an article about this on their site. See Why are my contributions not showing up on my profile? Regarding commits, the article says:

Commits

Commits will appear on your contributions graph if they meet all of the following conditions:

  • The commits were made within the past year.
  • The email address used for the commits is associated with your GitHub account.
  • The commits were made in a standalone repository, not a fork.
  • The commits were made:
    • In the repository's default branch (usually master)
    • In the gh-pages branch (for repositories with Project Pages sites)

In addition, at least one of the following must be true:

  • You are a collaborator on the repository or are a member of the organization that owns the repository.
  • You have forked the repository.
  • You have opened a pull request or issue in the repository.
  • You have starred the repository.

You can associate multiple email addresses with your GitHub account from your email settings page.

like image 97
Ajedi32 Avatar answered Oct 30 '22 17:10

Ajedi32


Make sure setting your email in local configuration.

git config --global user.name "kimcrab"
git config --global user.email "[email protected]"
like image 30
KimCrab Avatar answered Oct 30 '22 17:10

KimCrab