Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git contributions not showing up on GitHub

Tags:

git

github

I went through your following article https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/ for contribution not being shown on my profile.

To say the least.

  • I am pushing commits on my own repository master branch and I can see those commits on GitHub but they aren’t being added in my contribution.
  • Its been more than 24 hours and in multiple directories. No, None of the repository I am pushing my commits are forked.

  • They are no contributors to the given repository so I can push commits.

[Question:] Can someone tell me what wrong I could be doing? or how to fix it?

My git repository is: https://github.com/irohitb

Example: Consider this repository -> https://github.com/irohitb/Crypto, Here it says last commit was pushed 4 days ago but in my contribution, it doesn't show any contribution which I did in past week

like image 346
iRohitBhatia Avatar asked Sep 02 '18 12:09

iRohitBhatia


2 Answers

Check your git config user.name and git config user.email.

Your user.name should be irohitb, after your GitHub account.

The commit of the repo you mention (commit 0733750) shows:

Rohit Bhatia authored and Rohit Bhatia committed 4 days ago

In both instances, GitHub does not show a link to github.com/irohitb, which means the user.name or user.email didn't match the login/email of your GitHub account.

You would need to change the author of your past commits to rectify the situation.
See this example.

like image 127
VonC Avatar answered Oct 07 '22 22:10

VonC


GitHub uses only the commiter's email-address to determine their "identity".

If you use multiple email addresses, you can add all of them on GitHub's Setting page.

Note, that you have to validate each email address you want to add: so you really can only add valid (as in: they are accepted by a public mailserver) email addresses. an address like <[email protected]> cannot be validated, so you can't add it (and you should use git config user.email to set a valid email-address instead.)

PRO tip: you git config --global user.email to set your user-email for all repositories not just the one you are currently working with (a repository-local configuration will override the global settings).

like image 36
umläute Avatar answered Oct 07 '22 21:10

umläute