How to get started with contributing to Open Source?

A small guide on how to get started with contributing to Open Source. This guide covers how to find a project to contribute to and making your first Pull Request, and contains some resources.


What is Open Source?

Let me explain it to you like you are 5, think you have a recipe for chocolate chip cookies that you've created and you want to share it with your friends. You can give them the recipe so they can make the cookies too. Open source is kind of like that, but with software instead of cookies.

When software is open sourced, it means that the code that makes it work is available publicly for anyone to see or view. Your friends can take your cookie recipe, modify and tweak it and make their own version of it. Just like that, people can take open source software code and modify/change it to build their own version.

The code for open sourced software is shared with everyone, allowing people to collaborate, learn from each other, and improve that project.

Image

Why you should contribute to open source?

  • You get to meet cool people in tech, helps in networking.
  • You get to learn a lot of new things like new languages, frameworks and tools
  • You can showcase your contributions in your resume :)
  • By contributing, you are inspiring a lot of others to contribute.
  • It's fun, trust me the joy when your PR gets merged is unreal.
  • Your favorite anime waifu becomes happy.

Getting Started

Finding Projects to Contribute To

Firstly, You need to find projects to contribute to. Always finds projects around the skillset you have - someone experienced with Python can search projects written in Python.

Using GitHub To Search for Projects:

Go to https://github.com/topics and choose a topic you are interested in. You'll see a list of trending repositories related to that topic.

Other Websites To Find Projects:

Also, you can check the /r/developersIndia wiki on finding FOSS projects on GitHub.

Finding an issue to work on or working on an improvement

Check the issues tab of the repository to see if they are any issues that you can work on and submit a PR to improve the project. Some projects have an IRC channel, Discord server or a community where you can join and talk to the maintainers. Communicating clearly with them will help you a lot to contribute.

You have found an issue to work on, now what?

  • Fork the repository - How to Fork?
  • Make changes in that repository for solving the issue.
  • Commit changes.
  • You'll see a contribute button on your forked repository page, click on that and click on "open pull request".
  • Put your PR name, and a short summary of changes.
  • Create the PR

You have made your PR, now it's time to wait.

You have made your first pull request, now it's time to wait for a little bit. The maintainers will review the PR and will merge/close it or request changes on it.

What to do if a maintainer requests changes on your PR?

Commit the request changes in the forked repository, they'll automatically show up on the PR. Check the branch properly before committing to see if the branch the PR is fetching changes from and branch you are pushing changes is same. Once it's done, simply let them know by leaving a comment that you've done it.

What to do if a maintainer closes your PR?

Your PR may or may not be merged for some reasons, probably you didn't put the required effort into it - or the maintainers don't plan to add the enhancement. Don't lose hope, move on and make new PRs to other projects.

What to do if a maintainer merges your PR?

Congratulations! You have made your first open source contribution. Your anime waifu is now happy!

Image

What not to do when contributing to open source?

  • Post huge commits: Seriously no one likes huge commits, they are annoying.
  • Don't be a dick: Don't open PRs which create spam and makes you look like an asshole, here are some spam PRs.
  • Don't break consistency or the tradition: Don't end up using camelCase in repositories which are using snake_case.

Some other resources:

  • GitHub Guides: Official guides provided by GitHub covering various topics including contributing to open source projects.

  • First Contributions: A hands-on tutorial that walks you through the process of contributing to open source projects on GitHub.

  • Open Source Guides: A collection of resources and best practices for contributing to open source projects, maintained by GitHub.

  • Hacktoberfest: An annual event encouraging participation in open source during October, with rewards for completing contributions.

  • 24 Pull Requests: A project encouraging developers to send 24 pull requests to open source projects in December.

  • Contributor Covenant: A code of conduct for open source projects, providing guidelines on fostering an inclusive and welcoming community.

  • Good First Issues: Curates a list of projects with beginner-friendly issues, making it easier for new contributors to get started.

  • Open Source Friday: A global movement encouraging companies and individuals to contribute to open source projects every Friday.

  • CodeTriage: Helps you find open source projects that need assistance, providing a curated list of projects with open issues.

  • OpenHatch: Provides tools and resources for newcomers to find open source projects to contribute to, as well as mentorship opportunities.

  • Awesome First PR Opportunities: A curated list of projects with opportunities for beginners to make their first pull request.

  • Open Source Guides for Beginners: A curated list of resources specifically aimed at beginners looking to contribute to open source.

That's it, I guess.

~ LinearArray