Mastodon
//Ris Adams;

How to contribute to open source software projects

Cover image for How to contribute to open source software projects.

Open-source software is everywhere. Most of the software you use daily is open-source or built on top of open-source components. Contributing to open-source software is a great way to learn new skills and gain experience. It can also be an opportunity to help others, as many people worldwide often use open-source projects. It might seem intimidating initially, but it doesn’t need to be.

Getting started

Whether you’re a seasoned developer or just starting to learn, contributing to an open-source software (OSS) project is a great way to learn new skills, meet new people, and build a portfolio of work. With a bit of research and a little bit of effort, anyone can become an active contributor.

If you’re interested in contributing but don’t know where to start, this guide will provide a few (opinionated) ways to find a project and get started.

Be respectful

While it may seem obvious, it’s essential to be respectful of others. Open-source projects are often built by a small group of people who are passionate about the project. They are constantly working on the project on their own time and expenses and often do it for free. It’s important to remember that they are not obligated to help you; they are doing so because they want to.

Maintainers are often busy and may not be able to respond to your issue or pull request right away. Therefore, be patient in both time and tone. You’re more likely to get a negative response if you’re rude or impatient.

Find a project

The first step is to find a project that you find interesting. There are many ways to find a project, but the most common are

  • Contributing to a project you already use
  • Contributing to a project that you want to use
  • Contributing to a project that you want to learn

GitHub is a great place to start. You can search for projects by language, topic, or even by the number of stars. You can also search for projects that are looking for contributors. I recommend starting with a project you already use or want to use; this will make it easier to get started and help you understand the project better.

Non-code contributions

If you’re not a developer, don’t worry. There are many ways to contribute to open-source projects. For example, you can contribute to documentation, design, testing, and more. If you’re unsure where to start, you can look for issues labeled “good first issue” or “help wanted.” These issues are usually easier to solve and are a great way to get started.

You can also star the project and share it with your friends; this will help the project gain more visibility and attract more contributors.

If the project has a funding page, consider donating; this will help the project maintainers continue to work on the project and attract more contributors.

Look for Contribution Guidelines

Before you start contributing, it’s a good idea to read the contribution guidelines. These guidelines will help you understand the project better and make it easier to contribute. If the project doesn’t have a contribution guide, you can look for a contributing file in the repository. If you can’t find a contribution guide, you can ask the maintainers for help.

Some things you might want to look for in a contribution guide are

  • Style guidelines
  • How to report bugs
  • How to suggest improvements
  • How to set up a development environment
  • How to run tests
  • How to submit a pull request
  • An explanation of the project architecture and codebase

Some guides can be very simple, while others can be very detailed, but they all serve the same purpose: to help you understand the project better and to help you get started.

The contribution guide is an excellent way for the maintainers to communicate with contributors. Following the guidelines will help you write better code and make it easier for the maintainers to review your pull requests, making it more likely that your pull request will be accepted and merged.

Find an excellent first issue

Before you start contributing, look through the existing issues and pull requests to see if someone else has already reported the problem or submitted a fix. If you find a current issue, you can comment on it and ask if anyone is working on it. If no one is working on it, you can ask if you can.

It may also help to look at the closed pull requests to get an idea of what the maintainers are looking for. If you find a pull request similar to the issue you want to work on, you can comment and ask if the author is still working on it. If they’re not, you can ask if you can work on it.

Consider writing an enhancement to documentation or a test case. These areas are always ripe for improvement and often overlooked by contributors. Maintainers love to accept documentation improvements; as a bonus, you’ll learn more about the project.

Submit an issue or suggestion

Issue tracking is the core of any open-source project. They provide an opportunity for maintainers to communicate with contributors and for contributors to communicate with each other. When submitting an issue or suggestion, it’s important to first see if the issue has already been reported; if so, you can leave comments to voice your support or opinions. Maintainers often prioritize issues based on community feedback.

It also helps to gather as many details as possible before submitting a new issue.

  • Is this a bug? What did you expect to happen? What actually happened? Can you reproduce this consistently? What steps can you take to reproduce this issue?
  • Is this a feature request? What is the use case? What is the expected behavior? What is the current behavior? What alternatives have you considered? Sometimes it helps to frame the request from the end user’s perspective, which can help you understand the problem better and make it easier to explain to others.
  • Is this a question? If the project has a discussion forum, or communication tool, such as Slack or KeyBase, you can ask your question there. If not, you can submit an issue and ask your question. If you’re unsure if your question is appropriate, you can ask the maintainers first.
  • Is this a security issue? If you believe you’ve found a security issue, please report it responsibly. Many projects will ask that you report security issues privately. If you’re unsure, you can ask the maintainers first.

Contribute to discussions

Look through any existing questions on the project forums, communication tools, or StackOverflow. You may find questions you can answer or problems you can help solve.

Create a fork, and keep it up to date

It is generally recommended to create a fork of the project and work on it there; this will allow you to keep your changes separate from the main project and make it easier to submit pull requests. It will also make it easier to keep your fork up to date with the main project. If you’re unsure how to start working with a forked repository, follow the steps below.

1) Clone your fork

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2) Add a remote from the original repository in your forked repository

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

3) Updating your fork from the original repo to keep up with their changes

git pull upstream master

Reap the rewards

Open-source projects are a rewarding way to learn new skills and meet new people. It feels wonderful knowing that your work is helping others. It’s also a great way to build your resume and portfolio. While it may initially seem overwhelming, the OS Community is very welcoming and helpful. We love to work together to create amazing projects and make the world a better place.

§