14

I made 3–4 commits on a single day to my repo using the Mac client for GitHub but the contributions section on my profile page doesn't update itself with changes in varying shades of green.

Why does this happen?

4
  • Did you push your commits to GitHub? Do you see your commits in the 'Contribution Activity' below the contributions (green squares)?
    – Attila O.
    Mar 1, 2013 at 1:33
  • If you did the commits a week ago but pushed them recently it may be that they do not show up in the Contribution Activity because the Period is set to 1 Week. Try changing it to something else.
    – N.N.
    Mar 1, 2013 at 10:34
  • Commit history is based on when the commit was made, not when it was pushed up to Github
    – user35263
    Apr 16, 2013 at 11:28
  • Are you the owner of the repo, or is it a fork? May 22, 2013 at 22:00

5 Answers 5

12

There are several possibilities:

  • You have not pushed your commits up to Github. Unlike centralized version control systems, committing it git is done locally. When you have made commit(s) locally and want to synchronize your Github project page, you need to run 'git push' to send the commits upstream.

  • Your commits were not on the default branch (usually master) of a project. Other branches won't count towards the total until they are merged.

  • Your repository is a fork. In this case only commits that have been contributed upstream and merged into the master branch are counted.

  • Your commit was made with an email address other than ones you have told Github about.

  • You haven't waited long enough. The graph is not updated instantly.

See Github's help section Why are my contributions not showing up on my profile? for more tips.

3
  • So if I make several commits over the period of a month, do not squash them, and merge them to the default branch, the activity will show for each day I had a commit? Will that also work if I let github squash and merge them? May 3, 2022 at 3:49
  • 1
    @TemporaryFix Yes and no respectively. Squashing will reduce all the commits from a PR or branch into 1 commit at the time you make the merge.
    – Caleb
    May 3, 2022 at 11:33
  • Thats unfortunate, I like a clean git log with just 1 commit/feature but I also like the street cred of the activity log for each day I committed May 3, 2022 at 13:48
6

Had same problem, mine was fixed by setting the email

git config --global user.email [email protected]

Hope this helps.

1
  • 1
    WOW! This was what worked for me. I was trying a million other solutions. This worked. Thanks @daxsorbito
    – bozzmob
    Nov 18, 2015 at 3:49
1

You need to click on the Push option in GitHub for Mac so that the commits gets live on GitHub. Also, it might take a short little while before the contributions page gets updated to reflect your recent pushes.

1

Some repos only show 'Contribution Activity' for commits that have been merged into master, (although this may not apply in your case if you own the repo and are the only commiter).

If the commits are pushed but still not showing up in 'Contribution activity' on the days they were committed, then this may be because you made a pull request but your changes haven't been merged yet.

0

You can also check the email settings associated to your Github account as GitHub will not credit you with contributions made under a different account that is registered to your profile. I noticed the email associated with my account was an older email, so I added my current email address and set it as my "Primary" address. I refreshed my account and saw my contributions updated. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.