I\'ve been making continuous commits to my GitHub
repos from my linux shell and they show up nicely on the website just as they should. The only problem is that \"Y
A possible cause for this:
Commit was made in a fork
Commits made in a fork will not count toward your contributions.
https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
Maybe Github had fixed this problem. There is one simple way, go to github.com email setting: https://github.com/settings/emails
Personal settings --> Emails
You can add email address there, and verify your newer email address with send a verification link, then you will find your previous commits are all recorded in the 'Your Contributions` calendar. And this email verification will also let you receive notifications and password resets from GitHub.
Your new email address will be used for account-related notifications (e.g. account changes and billing receipts) as well as any web-based GitHub operations (e.g. edits and merges).
GitHub clearly states how they measure your contributions in their Help:
Issues and Pull Requests:
Commits:
Only 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:
In addition, at least one of the following must be true:
Note: After making a commit that meets the requirements to count as a contribution, you may need to wait for up to 24 hours to see the contribution appear on your contributions graph
I fixed the similar issue by Using GitHub profile's username as my git username in my local environment.
As a example,
https://github.com/susithrj
set global username as susithrj in your local git config.
git config --global user.name "susithrj"
I had the same exact problem, turns out it is because the email on my local git does not match the email on my GitHub account.
To update the email on your local machine:
git config --global user.email "your.email@email.com"
Verify that all your commits are updated on your github, if not you can check individual commits to see what email the commit is associated with by clicking on the commit and adding ".patch" to the end of the commit url like this:
https://github.com/username/repoName/commit/9fbe83f71cfc3503.patch
Now all you have to do is add that email you see to your account.(It does not need to be verified)
Check the commit again and you should see your username and credited :)
I had to restore my laptop recently and forgot to reconfig my email to git. My laptop username looks similar to my git one, so I just blindly thought my commits were being attributed correctly. As posted, you can change your global email settings. However, if you want to correct the miss-attributed commits on your project, you can use this run this script to create an alias gca
that you can run in your git project directory to change the authorship of your past commits.
From your ~
directory, add:
$ cat <<EOF >> ~/.aliases
function git_change_authorship {
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME=\"\$1\"
GIT_AUTHOR_EMAIL=\"\$2\"
GIT_COMMITTER_NAME=\"\$1\"
GIT_COMMITTER_EMAIL=\"\$2\"
"
}
alias gca=git_change_authorship
EOF
$ source ~/.aliases
then in your git project directory run gca <git username> <git email address>
Heads up! I have only used this in my own personal projects where I have been the sole committer. Haven't had a chance to test it out with group projects, so proceed cautiously.