How to Contribute to Open Source Projects

In this article, I will discuss the detailed process of contributing to open-source projects. Developers make Open-source projects public so anyone can use, update, and distribute the code. There are multiple reasons for declaring a project as open source. In this article, I will also put some light on the benefits of contributions to open source.

 

Here is a short overview 

The below bullet points are step-by-step guides that we will cover in the entire topic

 

  • Finding the Repositories for Contribution
  • How to Contribute to the codebase (Step-By-Step Guide)

Finding the Repositories for Contribution

To contribute in open source the very first step is to find the repos in which you can contribute. The word “repo” in the context of open-source software refers to a repository. You can think of this as a storage location for software projects, typically hosted on platforms like GitHub. There are multiple ways to find a codebase that aligns with your interest and tech stack. I’m referring to code files as the codebase here. You will find all the codebase inside the repo. I will explain some of the common ways in detail:

 

Check the apps you normally use:

Let’s look at the apps or software that you use personally day to day like cal.com or notion tool. Check whether their code is open source or not. You can use GitHub to search for those projects. GitHub is one of the biggest tools in the market to host both public and private repositories. If their code is open source, you are good to go with that. But first, you need to verify they must align with your tech stack. Otherwise, you need to find a replacement. I mean you need to check you know the language/framework in which the codebase is developed.


If that app is not open source then we have another suggestion here. You can find similar apps to this app, and then from these similar apps, you can find one that matches your tech requirements. For example, suppose Notion Tool is not open source and you used that tool day to day then you can search for a similar tool.


But the question is why I’m suggesting contributing to that project you used day to day? Well, because you already know the ins and outs of that tool. You are aware of most of the features and flow of the app. And then these thing makes it very easy for you to contribute in such kind of repos.

 

Browse Open Source Collection: 

Open Source Collection is an online directory for open-source web projects. You can browse a vast amount of code base from there. The best thing about this website is you don’t have to manually check whether each project is aligned with your tech stack. Well, what does that mean? It means this website provides you a filter by which you can filter the projects according to the technology you use day to day like PHP, JavaScript, Java, etc.

 

The other best thing I see about this Open Source Collection is you can filter the repos based on category. Suppose you are experienced with social media projects then you can apply the filter of category to only filter out the social media projects. In that way, you don’t have to spend much time searching the repo on which you want to contribute.

 

Finding Beginner-Friendly Repos:

There are a lot of online platforms where you can find projects that contain a lot of tasks specifically for new contributors. If you are a beginner in this contribution field and want to start from some easy stuff first then you can try these platforms.

You can browse the up-for-grabs.net platform to find such projects. Other than this you can also check firsttimersonly.com to find a lot of platforms like up-for-grabs. 

 

How to Contribute to the codebase (Step-By-Step Guide)

At this point, I hope you have a very clear idea about where to find your ideal repo to which you are going to contribute. Let’s talk about the actual process that will help in contributing so that your PRs will be accepted. Wait, what is a PR? It means “Pull Request”. I will explain that in one of the following steps.

  • Click on the issues in the project repository of GitHub. You will see a lot of issues related to bugs, feature requests, documentation, etc.
  • After selecting the issue that you think you can fix, simply fork the repo. Forking means creating a copy of the repo into your account.
  • Then clone that repo into your local dev environment. The git command to clone the repository is “git clone repo-url”
  • Create a new branch in that forked repo. The command is “git checkout -b branch-name”
  • Normally, in the repo, you can find a contribute.md where the instructions are listed on how to contribute. If that file doesn’t exist then there should be some instructions in the readme.md file.
  • After fixing the issue, commit your changes and push the new branch into the forked repo.
  • Finally, make a pull request from your forked repo to that original repo. Pull request means you are requesting the repository admins to merge your code into that repository.
    In the comments on the pull request, write “Fixes #999”. Here 999 is the issue number. Make sure to replace that with the actual issue number. What will happen by doing that? In the actual issue discussion, GitHub will mention the link of your PR automatically. Remember to put other details in the PR comments. Like what you exactly did to fix the issue.

 

Summary:

So in this article, we not only covered “how to contribute” but also covered “where to find the projects” on which you can contribute. We discussed a lot of platforms that you can use to find open-source projects like the Open Source Collection. Then we discussed a step-by-step detailed guide on how to contribute your code into the code repository.

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.