loading...

Why my commits aren't showing up on GitHub contributions graph?

duhbhavesh profile image Bhavesh Kasturi ・2 min read

Alt Text

So recently, I started using GitHub after building projects & after pushing my code on GitHub I was having an issue with my contributions graph - All of my commits were not showing up.

After lots of googling, support emails & help from people who are knowledgeable about git on discord community I figured out the issue.

There's the official GitHub article on Why are my contributions not showing up on my profile?


Commits

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

  • 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:

So after going through this GitHub doc, I found that the actual issue was with the Condition 1 -
The email address used for the commits is associated with your GitHub account

The issue I was experiencing was with the GitHub Desktop, email address wasn't matching with my GitHub account.

  • My GitHub email looked like test.name.ok@gmail.com
  • My GitHub Desktop email was test-name-ok@gmail.com this was the issue incorrect email!

If you're experiencing the same issue head over to the options tab in GitHub Desktop and make sure your desktop email is similar to your GitHub account.

Steps: File > Options > Git

Once I figured out the cause of the issue, I needed to fix my contributions graph so all of my commits will be back on my graph. I ran this script on each of my repositories to update the user info to the correct email address, voila! my commits were showing on the graph!

How to know if this is the issue you're facing?

Check your commit history for one of your repositories, If you don't see your avatar on your commits next to different commits, but you have avatar on your GitHub profile, you're probably not using the correct email for your commits.

The image above shows a portion of the commit history for one of my repositories. After I fixed the email issue, all of those commits showed my avatar.

After I fixed the email issue, all of those commits showed my avatar, As you can see in below image.

Conclusion

If you are not seeing your contributions on your graph, check that you are meeting all conditions, and be aware that it may be an issue with your email address used/not used correctly in the GitHub Desktop you use for version control on your local development environment.

Thank you for reading

Posted on by:

Discussion

pic
Editor guide