Help
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting all your commits in your contributions graph

GitHub Staff

The GitHub support team knows that your contributions graph matters. In fact, we have received 1,276 emails about contributions in the past six months alone! We know that it can be frustrating to realize that hours of hard work are missing from your graph and that it can be difficult to determine why.

 

We'll only add contributions to your graph if they meet certain criteria. Here are a few questions to ask yourself to ensure that your commits do meet those criteria so your graph accurately reflects all of your work.

 

Did you set your email address in Git?

 

Your commits only count as contributions if you author those commits using an email address that is associated with your GitHub account. That author information usually comes from your local Git configuration, so make sure you've followed these steps to set your email address correctly.

 

Note: You might have to enter your email address on the command line when you push a commit, but this isn't what gets the commit in your contribution graph. Make sure to also add your email to your local Git configuration.

 

If your graph is already missing commits for this reason, don't worry! You can fix it.

 

First, check to see which address you used to author the commit by adding .patch to the end of the commit URL, like this:

 

https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch

 

Then, check your email settings to see if the address you found is associated with your GitHub account. If not, follow these steps to add the address. It's okay if you can't verify the address—just adding the address will do!

 

If the address is generic (like laura@lauras-macbook.local) or already associated with another GitHub account, you won't be able to add that address to your account. If that's the case, you will need to rewrite the entire history of your Git repository for the commit to be counted as a contribution. Rewriting history is considered bad practice if you're collaborating with others, so we recommend doing so only in an emergency. If you do decide to go forward, here are a few instructions.

 

Are you working in a fork?

 

Commits to forks do not count as contributions until those commits have been merged into the upstream repository. If you don't plan to ever merge your changes upstream, you should consider working in a standalone repository instead. You can still use someone else's project as a starting point for your own project if the repository's license allows for it:

 

1. Clone the repository you want to use.

2. Create a new repository on GitHub.

3. Change the local repository's remote URL to point to your new repository.

4. Push the local repository to your new repository on GitHub.

 

Already started working in a fork? Support can detach your fork for you! Learn more.

 

Are you starring repositories you contribute to?

 

A commit will only count as a contribution if one of the following is 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.

 

We recommend starring any repositories you contribute to. That way, your commits to those repositories will remain in your contributions graph even if you leave the organization that owns the repository or delete your fork of the repository. Learn more about stars.

 

Did you choose to show private contributions?

 

GitHub hides commits in private repositories from your contributions graph by default. Learn how to display this activity to fill in your graph with as many green squares as possible.

 

How long has it been since you pushed the commit?

 

The contributions data for each repository is recalculated every time someone pushes to that repository. This can take some time, so if you made a commit recently, you may need to wait a few hours before the contribution shows up in your graph.

 

Ask us!

 

If you've asked yourself all these questions, and you're still missing contributions, there may be something wrong on our end! Want to make sure a specific commit to a public repository meets all the criteria for making your graph? Try this app.

 

If a commit that does meet all these criteria is still not in your graph after 24 hours, let the support team know! Contact us with the URL for the commit. We'll be happy to investigate!

3 Comments
Ground Controller Lvl 1

To be 100% clear, does this mean that for a private repo (i.e., enterprise edition github), if I...

(1) am a contributor at a company
(2) make commits for a year
(3) star the repo
(4) leave the company
(5) get removed as a contributor such that the repo is entirely invisible to me

...I can still see my contributions to that repo in my contributions chart?

Also - and this is my actual situation -  if I get removed as a contributor and don't star the repo, then get added back just to star, and then get removed again, will the contributions now be visible on my graph, or has the opportunity passed for good?

 

Ground Controller Lvl 1

Hm, this assumes one branch to rule them all.

 

That's not how all projects work. You can un-fork your project to get contributions to it recognized but then it will complicate merging back to the original project.

 

And you need to create a separate mirror for any relevant (ie stable) branch of your project which is not merged back into master.

 

Or maybe github could acknowledge that there is more than one branch relevant for some projects.

Ground Controller Lvl 1

This is not much help ..  I did what I was told to do (by github people)  I made sure my work email was linked to my profile.  I left this company and all my 250 contributions are GONE from the graph.. I am still trying to get some answers but it seems impossible.