How to Contribute to Open Source Projects on GitHub?

If you are new to the software engineering industry or just started studying computer science you may have heard about open source software like Git, Github, Version Control and must have been wondering about it. Open Source also referred to as OSS is the software code that is publicly accessible to anyone contributing to open source can lead you to better career opportunities also you can network and connect with awesome like-minded people. In this article, we will be going to study – What is open-source? How you can get started with open source? Being a beginner and getting into open source can be confusing and overwhelming because of not getting a proper roadmap and guidance.

How-to-Contribute-to-Open-Source-Projects-on-GitHub

So this article paves the way for beginners, involving 6 steps for beginners to get started with open source, Sounds Great, Right? So without wasting any further time let’s get right into it.

What is Open Source?

OSS acronym for Open source software is software and its code is available to anyone who can use this software for free and can also modify their code. A code for a particular software is stored in repositories under various licenses. A few famous licenses are:

  1. MIT license
  2. Apache license 2.0
  3. GPL license
  4. BSD license

The rules and licenses of OSS are very different from proprietary software. Individual who wants to contribute to a repository can make contributions according to rules and licenses set by maintainers of that repository. Open source is a way to collab and contributes depending upon peer review and community guidelines.

Open Source is indeed changing the ways of the software industry by making it more flexible and easily accessible to everyone. Today, Open source software is widely used around everywhere in the world some examples of famous OSS are

  • Linux: One of the most used operating systems. Most famous Linux distributions such as Ubuntu, Debian, Fedora .etc are all open-sourced and free to use
  • Mozilla Firefox: A widely used web browser
  • VLC media player: Video player which can play almost all types of videos

How to Get Started with Open Source?

  • Understand why you want to get in open source
  • Choosing the best software and version control technology
  • Choosing where to contribute (finding orgs to contribute)
  • Understanding Codebase
  • Finding Issues
  • Making your first PR

1. Understanding Why You Want to Get in Open Source

You decided to get into open source, this field is big and going to open a lot of career options for you so it’s necessary to have a clear vision – Why do you want to get into open source? To avoid confusion having a long-term plan will help you to retain your motivation.

Having a passion for software and working with the team will give you a boost if you love to communicate with people about solutions and ideas you are welcome in any community. Don’t worry if you don’t know how to communicate with people you can always learn. Remember once you choose to start contributing to any organization try to stick with them for as long as possible else only contributing for the short term won’t get you anywhere.

Now, if you really think you have patience and interest in open source let’s get started.

2. Choosing Version Control Software

This is an important step where you have to choose which version control software you are going to use. Version control provides you with a convenient way of tracking and managing your software version. There are multiple options available for you to choose from Github, GitLab, GitBucket, bitbucket .etc. If you are already familiar with one go ahead with it or you can try all of them and find which one suits best for you.

We will suggest using GitHub as it is the one used by most organizations due to its popularity and availability of a wide range of features. Another perk of using GitHub is it is free for everyone, the issue tracker of GitHub is very much better than other software. Github documentation is very much organized in different sections.

So If you are a beginner we recommend you to start with Github. There are various resources available where you can learn git and GitHub and try to create your own repositories and practice git commands. Once you are comfortable using them you can take a step further and start contributing to someone else’s code.

3. Finding a Repository to Contribute

In this step, we are going to choose where we are going to contribute whether it can be an organization or an individual project, choosing a project can be a difficult task, it can be confusing because there are a lot of options available for you to choose between, slow down and keep few things in mind.

  • Take small steps, doesn’t matter whether you are contributing to a big project or to your friend’s repository.
  • Every contribution counts whether it is a documentation fix or bug fix or finding an issue.

So let’s get down to how you can actually find your repository.

a) Understand your interests: Find what is one thing that you can do and not get bored quickly it can be machine learning, web development, etc. Finding a repository to contribute:

Step A: Go to GitHub and click on Explore

GitHub - Explore

Github Homepage

Step B: Click on Topics

GitHub - Topics

Github Explore

Step-C: Click on the topic of your interest

Select Topics on GitHub

List of topics

Step D: Here show all the repositories according to your topic

show all the repositories - github

Repositories related to the selected topic

b) Choosing a Repository: Now you have a list of repositories according to your interest. Go through each and every repository. Try to know about what it does, read documentation, know about its community, does it have active members, try using it. Doing this will give you a brief idea of ​​how things work in a certain organization. Try and shortlist 2 to 3 repositories to which you are willing to contribute.

c) Finalization: Now that you know where to contribute, introduce yourself to the community understand their ways, guidelines to make contributions, writing and linting style, project structure try and get involved in discussions.

4. Understanding the Codebase

This is the most difficult part every new contributor faces. Beginners try to understand the whole codebase at once, trying to understand the whole thing won’t get you anywhere and will make you confused so it’s necessary to take small steps. While understanding the codebase keep a few things in mind.

  • It took years for maintainers to write this code, so It’s ok if you don’t understand some parts.
  • Communication is the key, it is necessary to ask smart questions understand maintainers don’t have enough time to answer silly questions.
  • Having patience is important you won’t understand everything at once, give yourself time.

Now let’s move to steps you can follow to understand the code.

a. Project Structure: Understanding project structure is important to the step where you need to understand what kind of files is stored in which folder, learn about file and folder hierarchy also their naming structure.

b. Coding Style: To understand code first you need to understand their coding standards learn about naming variables, functions, the format also follow those standards while writing code.

c. Read Documentation: To understand the code you need to understand what that code does also by reading docs you will know more about the above two points. The documentation gives you an overview of what code is doing.

d. Pull Requests: Go through old merged pull requests and learn what changes they made related to which issue. This will help if you come across a somewhat similar issue.

e. Understand Through Issues: If you started understanding the whole code you will be confused, so choose an issue first (read next point) and according to that try to understand code related to that issue only so the more issue you solve the better you get.

5. Finding and Solving Issues

Now we know what and where to contribute it’s time to get to know more about the repository. In GitHub, every repository has an issues tab, where you can see current problems, bugs, issues about the repository are listed. If the repository is well-maintained organizations like to specify labels to filter issues, these labels help to find relevant issues. You can search for issues according to these labels.

Some common labels are:

  • Good first issue
  • Bug
  • New feature
  • Easy

The organization also can create its own labels according to their convenience.

a. Good First Issue: Being a beginner you should try and solve easy and good first issues with these easy issues will help you to understand the codebase also solving these issues will give you a boost and motivate you to solve big issues.

b. Communication: Your duty is to find an efficient solution for a particular problem. If you have any suggestions or ideas you can always communicate them with a mentor. Also, you can participate in conversations related to other issues.

c. Resources: To solve any issue making good use of resources such as reference links mentioned in the issue is really important.

6. Making a Pull Request

Before you make a pull request, understand What is pull request? The changes you make in the code and push to a repository are viewed by other members and merged into the base branch when approved by active members. Now that you have solved an issue it’s time to open a pull request. It is important to make proper changes while making pull requests it is necessary to write a good commit message and description about what issue this pull request will solve.

  • Write commits according to the issue you solved.
  • Write commit like if you are giving orders to GitHub. For Example: fix the addition function.
  • Push your changes and wait for review.

Mentors will review your pull request and will provide you with the feedback you should always take feedback in a positive way and make changes accordingly.

Additional Tips:

  • If you are a student you can participate in open source programs like Google Summer of code, Linux foundation, Major league hacking .etc this will help you kickstart your career
  • Give yourself time to take 1 to 2 months to understand. Don’t quit early if you are unable to do contributions.
  • Find a mentor who will review your code.
  • Post your contributions on social media.
  • Any organization can never get enough documentation In your free time you can always make improvements in the documentation.

Leave a Comment