Master branch commits not showing up on contribution record

I am fairly new to GitHub. I created a repo main and master, all my commits are going to the master branch but are not showing up on my contribution record. Is there a way to fix this. Also I can’t figure out how to push all the master files to the already existing main branch ( i think we need to migrate out of the master branches now correct?!). Any assistance would be great.

Did you install Git? If not, you want to make sure that your email account is associated with your GitHub account.

Also, make sure that it is not a fork repo, no matter what, if that is not merged with the original repo, commits will not be counted.

Now, there is a confusion with main branch of GitHub and master branch of Git. Github was using the same exact term, but they changed that to main because master also indicates slavery, a bad notion as we all know.

You can check out the link provided on how GitHub count commits:

These issues may be connected: Only commits on the default branch of your repository are counted for the contribution record (as long as the repository isn’t a fork, as @jdevstatic mentioned). You can check and select the default branch in the “branches” section of the repository settings.

How to get the commits currently on master to main depends on what result you want: Do you want to combine what is on both branches, or discard what’s currently on main? In the former case you’ll need to merge master into main, in the latter reset main to the current state of master and then force-push.

1 Like

the result of GitHub changing the term master to main creates a lot of confusion for the others