GitHub Contribution

While I was doing every day commit challenge, I learned a few surprises that I want to share with you.

If you are not familiar with GitHub contribution, it’s basically a way to track your activity on GitHub. You can see the number of commits you made in a day, and the number of days you made a commit in a week. It’s a great way to track your progress and keep yourself accountable.

However, if you take a closer look at the contribution, you will notice that sometimes the contribution is not counting the way you think it would.

Committing to the ‘non-main’ branch

I’ve noticed that if you commit to the branch other than the main branch, it doesn’t count as a contribution immediately. If the branch is merged to the main branch, then it will count as a contribution. So if you are doing a pull request, make sure to merge it to the main branch to count as a contribution.

Committing to the forked repository

If you are working on a forked repository, it won’t count as a contribution. You will have to make a pull request to the original repository to count as a contribution. For me, I noticed that my blog (github.io) posts are not counting as a contribution. It turned out that since I forked the repository for a template, it wasn’t counting as a contribution. If you know that you are going to be working on a forked repository that is not going to be merged to the original repository and want to make your commit count, you can request GitHub customer service to detach the forked repository.

img.png img_1.png