You might be wondering what is Open-Source code, why is it important, why do you want so badly to contribute and how to do so.
If you are navigating Dev.to you are probably a developer. It doesn't matter your expertise, seniority or anything because you probably have Impostor Syndrome in everything related to your profession.
I've been a developer for the last 4 or 5 years and I'm studying Computer Science, however, every single time October arrived i paralysed. I couldn't even begin to think on how to contribute to Open-Source code. In my head, I had to resolve issues on complicated applications such as Git, The Linux Kernel, Vue.Js and so on and so on.
But this was far from wrong...
You can either go and read about it here or you can get a brief explanation from a regular developer such as yourself.
Open-Source code is a philosophy in which the code is from and for everyone. That means that you can get a copy of an Open-Source repository and make it your own, making the changes that you like/want and using it as if you were the one who developed the thing in the first place. (I'm not going to dive here on the monetisation implications of open-source code)
This is really a subjective point. You can either think that you are serving the community and you are giving your piece back with the knowledge you got from it in the first place.
Or maybe you are just like me. Every experience you get furthers your limit horizons. Or as i like to put it The World ends with you
Knowledge. Again, you want to know things in this field. It doesn't matter if you become an expert on Open-Source Contributing, but you participated, you learned, now you can brag about it on your next interview and to your friends (of course, nor you nor me have any... sniff)
Now that i have your attention. I'm going to show you a simple list on the steps you are going to follow to contribute before detailing them:
- Link your Github Account to DigitalOcean
- Now choose the repository on which you are going to contribute
- Fork the repository
- Clone the repository
- Create a branch
- Change the code to your will
- Commit your changes
- Push the changes
- Create a Pull-Request to the master branch of the original Fork
10. Watch Attack on Titans while the Repo Owner approves your PR
That's it. Was it that hard? (That's what she said)
Since the first two steps are kind of basic, we are going to step toward step 3. Also, i'm going to use my own repository as an example
Up right in the repository you'll see a couple of buttons. Click on the Fork one in order to create your own forked version of the repository. This will create a copy of the original repo on your own profile.
Open a terminal on your computer (Linux Systems, MacOs) or Github Desktop (Windows. I'm not going to get into how it's done with the GUI in this post).
Now create a folder where you want the cloned repository to live (Don't forget to replace HTTPS_LINK with the copied link):
Congratulations, now the code is inside your computer Now head to your repository folder and create a new branch (Again, change the name of the branch. You can name it whatever you want, but try to be declarative):
Now it's time for your creativity and previous knowledge to come in place. Check the issues of the repository first for a known issue with the application, or look for a bug, or add documentation, format the documentation. The possibilities are infinite. To showcase this, we are going to add a line to the Readme File:
Your changes to the repository are Staged now. It means that they are prepared to be sent to the original repository. We are going to this by pushing them
First time you are pushing to a new repository you may be asked to set the upstream, so copy and paste the command shown on the terminal.
We've gone through a long way but we finally reached the end. Go back to Github to your forked repository. You'll see there's a lovely sign that you can create a Pull-Request to the master branch and we sure do want to do it:
Check that your branch is going to be merged into the corresponding branch and just Create the new PR. And that's just it. Really, simple, fast, overly-documented.
If you are really scared of just looking for repositories to make a change on, just create a pull request on ListBot and add your Github Profile on the contributors list in the ReadMe File.
Happy Hacktoberfest to everybody!
PD: there's no free beer