October is here again! and with it, a new opportunity to contribute to Open-Source code.
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.
First of all: Don't Panic
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...
What is Open-Source
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)
Why is it important
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
Why you want it so badly?
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)
...Also T-shirt...
How to Contribute
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)
Step by step
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
Step 3:
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.
Step 4
Now you'll need to clone the repository. If this is your first time, copy the Https link provided on the Green Code Button and let's head to your local computer/
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):
Step 5
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):
Step 6 & 7
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:
Step 8
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.
Step 9
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.
And that's it
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
Top comments (0)