1-Dec

Open Source

How to contribute to Open source

We think Open Source is such an important part of a developer’s life that we’ve devoted an entire advent calendar to the subject! For a lot of developers, the thought of putting your code or ideas out there for the whole community to see, can be daunting. Once you get the hang of it and get more comfortable though, it has a tendency to drag you in.

Let's start by going through your first steps towards your first contribution together.

3 min read

·

By Henrik Walker Moe

·

December 1, 2019

Getting started

Using Git and GitHub

GitHub is a platform for hosting and collaborating on Git-repositories. You should have a basic understanding of Git in order to contribute.

Create an account on GitHub

In order to contribute to repositories you'll need a GitHub account. Create an account if you don't have one already.

Look for a good first issue

A great way to get started is to look for issues by using www.firsttimersonly.com or searching GitHub for issues marked as good-first-issue.

Here's a few ideas on what typically are low-hanging fruits:

  • fix errors in the repository's documentation
  • write missing documentation
  • fix spelling in code or in documentation
  • help out on troubleshooting other people's issues
  • give feedback on pull requests

Before you start working

Look for the README or the CONTRIBUTING file first, you'll usually find those at the repository's root folder.

The maintainers might have a set of requirements that you should fulfill before you start working. Maybe its signing a Contributor License Agreement like the .NET Foundation has or following steps for testing your changes before you create the pull request.

Work on your issue

Once you've found an issue you're comfortable working on, fork the repository to your account and clone your fork to your local machine.

Choose a Git-workflow that suits your preferred way of working on Git and start your work!

When picking an issue and committing time to work on it, it's good practice to write a comment on the issue stating that you're keen on helping out. This lets the repository maintainers know that someone's working on it, they might even assign you to the issue 😀

Tip: refer your pull request and issue by using #<issue/pull request id>. This generates a link to the issue/pull request.

Create a pull request

Once your work is done and you've pushed your changes on your branch to your fork on GitHub, you are ready to create a pull request. This tells the maintainers that your work is ready to be reviewed and your code merged from your branch to the master branch.

Pay attention to the pull request and any build steps it might trigger. If the pull request build fails, you'll need to fix your code so that the build succeeds before continuing.

Check up on your GitHub notifications as you might get comments and need to adjust your work, based on the feedback you'll receive from the maintainers.

Issue fixed and closed

Once the maintainers have completed your pull request, your work is done! On the issue's page you'll see that your pull request has been merged and marked as complete.

Congratulations on your first Open Source contribution! Well done! 🎉👏

Up next...

Loading…

Loading…