Photo by Roman Synkevych πΊπ¦ on Unsplash
Open-Source contribution, a beginner's guide (in 2 minutes).
The core concept of open-source you need to know
Open-source is not a new concept but in recent years specially it has gained more attention from both developers and the companies in tech industry.
Successful businesses such as Gitlab, Terraform and Sentry are some of the examples of billion dollar startup unicorns which all are offering a service which is open-source at its heart.
Not only these companies have hired the main contributors in their open-source projects, but also other companies are keen to hire developers who have proved their skills and experience working on an open-source project.
In this post I give you a practical guide with the useful commands and scenarios you need to be aware of to be able to start contributing to open-source.
First of all each open-source project is stored on one or more Git repositories, meaning you need to know some basics of Git and the platform.
Github
The most popular platform used by absolute majority of open-source projects is Github. So let's start with the very first things you should know about an open-source repository on Github by an example.
In this picture I've added some details about some particularly important parts of the Github panel on the landing page of a repository (dotenx).
On this page we have the links to the Issues
and Pull Requests
pages.
Issues
In this page you can see all the "Issues" of the repository.
The open issues are either reported by someone or created by the contributors to address a bug, a missing part in a feature, problem in the documentation, etc.
This is where you can search particularly for the open areas to contribute to the project. You can usually search for the issues with labels like these:
- good-first-issue
- easy
- beginner
Pull Requests
Changing the source code in open-source repositories happen through PRs. A Pull Request in simple terms means "These are my changes, pull them and merge them into the repository if OK".
In order to create a PR you have to follow these steps:
- Identify an issue you want to work on
- Fork the repository
- Clone the forked repository:
git clone <repo url>
- Create a branch:
git checkout -b <your branch name>
- Implement your changes
- Commit the changes:
git commit -m <commit message>
- Push the changes:
git push
- Create a PR on the original repository
- Respond to the reviews and commit+push new changes if required
If you liked this article please consider supporting my open-source work by adding a star to this repository:
If you're interested to see more beginner friendly, easily digestible, git and open-source articles please let me know in the comments or like this post.