The Ultimate Guide to Contributing to Open Source

Intertech, Inc.
4 min readJul 17, 2019

by Tom Helvick

Making your first open source contributions can be intimidating. However, it’s also one of the best things you can do to improve your resume, help the community, and grow as a developer. Open source maintainers are some of the most talented developers out there, and you’re sure to learn a lot. In this guide, we’ll cover how to contribute to open source projects, starting from zero.

Find a Project

The first step in making a contribution is to find a project you’re interested in that needs your help. That’s easier said than done. For many popular projects that you use everyday, a lot of the easy work will have been done already. The issues and bug reports currently in the queue require a detailed understanding of the entire codebase, something that could take you weeks to learn before you become useful. These big projects also likely already have several maintainers actively working on them.

If you’re just starting out with open source, pick a smaller project for your first contributions. You want something that people are actively using. However, maybe there are only a few maintainers on the project. You’ll be more likely to be able to help out with simple fixes and features. As you learn the code base, you’ll be one of only a handful of people who know the ins and outs of the project, making you more valuable.

Sites like FirstTimersOnly and CodeTriage make choosing a project easier. You can see the projects that explicitly need help from first-time contributors or have specific types of needs. Whatever you choose, make sure you pick something you’re actually interested in so that you want to stick with it!

Find Something You Can Contribute

As a new contributor, it might be difficult to find your first contribution. The first place to start looking is in the project’s reported issues list. These often have labels where the maintainers can indicate certain fixes that might be good candidates for first-time contributors. If you find an issue that looks like you could solve, then comment on it to claim it so that multiple people aren’t working on the same issue at the same time.

Sometimes, there may not be issues you’re ready to tackle right away. In those cases, try working your way through the documentation for the project to see if you notice any issues. Contributions to documentation count as contributions to open source, and they’re very important. As you work on documentation, you’ll also probably start digging into the source code as well. There, you may notice opportunities for improvements.

Read & Ask Before You Do It

Once you’ve found something to work on, don’t just dive right into it. Instead, spend a little while reading the contribution guidelines for the project. Furthermore, read everything you can about the issue, and try to reproduce it on your machine. Next, visit the project’s forum or chatroom to talk about the issue. Ask questions about why the issue exists and the implications of your proposed change. Only once you get the go-ahead from existing maintainers should you start on the fix.

Test Your Fix

Any good open source project will have an entire test suite. When you’re ready to edit the source code, you’ll download it locally to your machine. Right after the download, run the test suite to make sure everything passes on your installation. Then, make your changes. Next, re-run the test suite again. Your changes shouldn’t break any existing tests.

If you’re writing a new feature, then you should add tests for that feature as well as part of your contribution.

Create a Pull Request

Chances are the open source project uses Git for version control. So, when you initially download the code, you’ll actually be forking the main project repository. That way, you’ll have a copy of the repository associated with your username on GitHub, but with the main repository as its upstream parent.

From there, you’ll want to create a new branch of your Git repo to commit your changes. Push that new branch, and then use GitHub’s instructions for creating a pull request from a fork.

When you create the pull request, make sure to read the project’s documentation. They’ll likely have some guidelines on information to include with your pull request to make sure it gets approved as quickly as possible.

Repeat: Welcome to Open Source!

You did it! That was just one contribution. Now, go find something else to contribute! Thanks for making the open source community just a little better. The open source ecosystem is so awesome thanks to the individual contributions of developers around the world. It’s a really cool thing to be able to contribute to software that people use around the world.

About Intertech

Founded in 1991, Intertech delivers software development consulting and IT training to Fortune 500, Government and Leading Technology institutions. Learn more about us. Whether you are a developer interested in working for a company that invests in its employees or a company looking to partner with a team of technology leaders who provide solutions, mentor staff and add true business value, we’d like to meet you.

--

--

Intertech, Inc.

A leading software development consulting firm with a unique blend of consulting, training, and mentoring.