Git basics: Contributing to open source

β€” 3 minute read

permalink

In the previous article, we looked at how you can create pull requests. We can put these in action when contributing to open source.

In this article, we'll go through the following steps.

  • Fork an open-source repo
  • Make changes to the repo
  • Create a PR for the open-source team

By the end, we'll have contributed to an open-source project πŸŽ‰

Fork an open-source repo permalink

Before we can start contributing to open source, we first have to find a project we wish to work on.

You might have a project in mind. If not, you can use these tools to find a good first issue to get started with.

Don't forget to comment on the issue if you can pick this up. To make sure someone else is not working on it already.

Once the ticket is assigned to you, you can start working on it.

In that repo, click the "Fork" button to create your fork for this project.

Fork an existing repo

That copies the repo to your profile, so you can work on it without interfering with the original one.

Forked repo

Make changes to the repo permalink

Then you can set up this project locally and make sure you can run it on your system.

The simplest way is to clone the project and follow the steps in the readme.

Then make the change you discussed in the initial issue. Some bigger repo's come with a contributing.md file. Keep an eye out for those or any specific contributing guidelines.

Once you are done, make sure to create a new branch for your local version of this project and commit the changes to that one.

This branch should now show up in your version of the forked project like so:

Forked project branch

Create a PR for the open-source team permalink

If you click that big green button we see above saying "Compare and Pull request", we open a PR to the original repo.

Create PR on the original project

Make sure you fill out the template as the project provides it. Once you are happy with it, you can submit the PR.

Give the team some time to review it, as they might be swamped with PRs.

And there you go, you now contributed to open source! Great feeling, right?

Thank you for reading, and let's connect! permalink

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter