DEV Community

Cover image for How to make your first open source contribution
dragonDScript
dragonDScript

Posted on

How to make your first open source contribution

You've probably heard of what open source software is and how it works. But do you want know how it's REALLY made?

Open source software is not free software

First, you need to differentiate what open source software is. It's not software available for free. It's not software whose code is available. No.

Aseprite, Epic Games and Wexond would fit this definition of "source code available" but not open source.

These are the characteristics of open source software:

  • Open source software is available for everyone
  • Open source software always have a LICENSE file in their root
  • Open source software can be freely forked without ANY restrictions
  • You must keep the same LICENSE if you fork a project

See what's the definition of open source software here

OK, now we know what OSS is, but how is it made?

Ways to contribute to oss software

Even though I'm covering code contributions, there are other ways to contribute to OSS software:

  • Financiation $$
  • Translation and localization
  • Community support

You'll need git, learn it.

Most OSS use Git, which is a versioning system. It lets you handle code changes. I'm not covering how to use Git here, if you need to learn it you can visit any tutorial you want.

Your first contribution and the github flow

You want to contribute to that project you've used for your project. But don't know what do. Here's when tags come in handy. Specially good-first-issue. Issues with this tag are easy to do for newcomers to the project.
Image description
There's also Assignee: assigned to nobody which makes sure that one has already taken the issue.

Image description

Take an easy one

You don't want to be writing this contribution for 8 hours. You have a life and maybe a job. So take easy and feasable issues when you're a beginner.

Now what?

OK, I have chosen an issue or maybe I've created one. Now what?

  1. Fork the repository.
  2. Clone the fork to your PC.

git clone https://github.com/<USERNAME>/<REPO NAME>

  1. Create a branch and switch to it.

git switch -c my-branch-name

  1. Make the changes you want in your IDE of preference. I suggest VS Code. Create little commits, and little PRs.
  2. Push the branch.

git push

  1. Create the PR

Image description

  1. OK, what do I do now? You will get reviews from maintainers that ask you to improve X and Y. Make the changes, ask another review and wait for a merge
  2. Wait, they have closed my PR ;-;

    Don't worry, it happens. For many reasons. Accept it.

Top comments (0)