07/17/2024
How to contribute to open source projects
I quickly want to talk about how to contribute to open source projects. From my personal experience, it can be at first quite overwhelming where to start and what to do. I will try to give you some tips and tricks that I have learned over the years.
Also I want to show on a real contribution to an open source project how the overall process in general works.
TL;DR
Some words about fears
At least for me before doing my first contribution, I was a bit afraid. I was afraid to do some mistakes or to “just contribute docs or typo corrections”. I quickly learned that my fear was totally unfounded.
Usually, the maintainers of a project are very supportive and helpful to new contributors. Actually, theye are also very happy about the smallest contributions, even if it is “just a typo correction”. Because at the end you are pvoding a little improvement and the maintainers save their time and energy due to your contribution.
How to contribute
I want to explain the most important steps from my perspective based on a first contribution to an open source project where I did not contribute before.
The project of my choice was ngxtension. If you don’t know ngxtension
: It is a collection of useful Angular utilities. As Angular developer you should definitely check it out.
Find a project
A good starting point is to search for a project on GitHub. I usually contribute to projects which I use myself extensively.
My project of choice is ngxtension.
Find an issue
If you want to contribute to an open source project, you should first find an issue.
Usually there are some issues labeled with good-first-issue
or help wanted
. In case of typo corrections or ducumentation enhancements often you will not find any issue, you can just do the contribution and open a PR.
In my case I created a feature request and I also contributed the implementation.
Implementation-Steps
Usually most open source projects have a CONTRIBUTING.md
file. Read this file carefully and follow the instructions.
Fork the project
First step is to fork the project. This is done by clicking on the fork
button on the top right of the project page. At least that is the case for GitHub.
Implement the feature
After you forked the project, you can clone the project locally, install the dependencies (steps explained in the CONTRIBUTING.md
file) and do the actual implementation. Most open source projects do
also have quite high standards, so you should definitely also write tests and add documentation if necessary.
However, if you forget it or have problems to do so, you can also ask for help.
Open a PR
After you are done with all the implementation work, you can push your changes to your forked repository and open a pull request to the original repository. By default on GitHub a PR against the original repository will be created.
Wait for the maintainers to review your PR
Be patient :-) and wait for the maintainers to review your PR. Let’s remind ourselves: OS maintainers usually spend their free time and they usually do not receive any financial compensation for their efforts.
If the maintainers ask for changes, make the changes and once everything is fine, the PR will be merged.
✅ Hurry - you did a contribution!
Conclusion
Contributing to open source projects can initially feel daunting, but it is a highly rewarding experience. By following the steps outlined above, you can make meaningful contributions to projects that you care about. Remember, every contribution, no matter how small, is valuable. Maintainers appreciate your efforts, and you’ll gain experience and confidence in the process.
A nice side-effect is also that over time you will get more familiar with the project you contribute to. This can also be a great opportunity to learn new skills and improve your coding abilities. Also this might make you more attractive to potential employers.
Happy contributing!