Want to get started with open source contributions? Click here
Participating in open source is the best way to learn by doing and become more knowledgeable about the possibilities that open source opens up
Letās try to understand with an example
Imagine that you are a well-known architect š· whose upcoming job is to construct a magnificent home šļø complete with all the comforts and amenities. Therefore, you are fully prepared for it. You have drawn out a blueprint for the house and constructed a model of it, so all that is left to do is to begin building it.
As you begin construction on a home, you notice that things are not going as you had anticipatedĀ š¤Ø. Some sort of issue always arises that prevents construction, and since you are unable to handle all of these issues on your own, you have decided to seek assistance from the community of fellow architects š·š¼āāļøš·š»āāļøĀ , who are ready and willing to assist you.
With all the help of fellow architects, your house is built in no timeĀ š.
And the same thing goes for developers
When you start to construct a large project, such as a website or app, you run into a lot of faults and errors. Sometimes it is hard for you to fix all of these problems by yourself, so you open up your application to the public for help and fixing issues.
This article is divided into a series of two articles
- As a firstĀ Article, you will learn the fundamentals of open source contribution, and we will make an open source contribution to get a feel for how all these things work together in practice.
- Our second section article will involve finding a problem, solving it, and putting it into practice.
Now I think you have a better understanding of what is the basic idea behind open source contributions and why you need it.
Now letās get your hand dirty and get started with open source contribution
But before you start I want you to get your prerequisites checked so we all are on the same page and donāt worry if you lack any of the following perquisites, I will also tell you where you learn them and if you are still struggling then feel free to contact me
Prerequisites
- Basic Git understanding
Where to learn?
Let's do some open source contribution
We will start our open source contribution journey with Github, there are multiple other version control systems like GitLab, Beanstalk, etc.
Go to GitHub and create your free account, proceed if you already have an account.
- Go to this website on click on get started which will take you to its GitHub repo. Now you can follow their guide to make your first contribution or you can also follow me.
- To get yourself started, fork the repo by clicking on the fort button
What does fork mean?
Basically, what the fork does is it copy the whole repo from another Github account and paste into your GitHub account without affecting the any of the repoās.
Now a forked repo is created into your account, letās clone the repo into our local machine so we can edit and add our name to the contributor's list.
- simply copy the code and open your terminal
- Into your terminal enter āgit clone <copid link>
- It will download the complete repo into your local machine
- Navigate to the directory that you have downloaded right now and open it with your favorite code editor ( I am using VS CODE )
Note ā Keep one thing in mind whenever you make a contribution to an open source project, never work on the main branch, always create another branch to work on.
We will also do the same as quoted above
- Check your current branch ā git status
Outputā origin/main
- Create another branch ā git checkout -b teaching_first_OpenSource
Output āSwitched to a new branch āteaching_first_OpenSourceā ( you can use any name for the new branch ).
Now we are all set to make our first contribution, basically, our task is to add our name and our GitHub account link to the contributor's list.
- Open the Contributors.md file and add your name with your Github profile link anywhere between the file
Okie Dokie now you have added yourself to the contributor's list š
- If you typeā git status into the terminal you will see that Git is pointing out the changed file.
- Add your chargesāgit add contributors.md
- Then itās time to commit our changesāgit commit -m āthis is my first contribution and family guy is best"
- Finally, push those changes into your forked repo āgit push -u origin <your current branch name> and merged the repo with the original repo.
Wallah Habibi š³ you have finally made your first open source contribution.
ok now you might be getting angry and thinking š¤ what the sack š¤¬ this guy teaching us, the internet is full of all of this information. It is nothing new.
Okie Dokie I got your point, you want something real you want something brave you want something uuhhmm š¤š¤š¤ leave it... Basically, you want to contribute to open source.
As you wish
On public demand ( i donāt see any public here š ) Itās time for you to learn how to make a real contribution to the open source community. So let's get started
Wait before you move forward remember
Contributing to open source involves more than just coding or fixing bugs; in addition to them, you can document a project, assist other developers, answer questions, etc. In most cases, recruiters who look at your open source contributions are looking for your communication and management skills.
Keeping the above point in mind, I assume that I am a non-technical guy but still I want to do an open source contribution.
For such kinds of people and as well as beginners (sometimes I forget the spelling of beginner š ) there is an awesome list, in which you can find tons of resources to explore, learn and do contributions.
I am choosing one of the lists from the awesome listāMind Expanding Books.
This is a repository consisting of amazing book lists, and you simply need to add a new book to the list, wait man š¤Ø Am I teaching you to be a copycat š !! Yes, I am, in that case, I want you to do it by yourself, I will only show the steps and the rest is up to you.
- Go toā Mind Expanding Books
- Read their contribution guidelines
- Fork that repo
- Clone the repo on the local machine
- Navigate to the cloned repo and change the branch
- Add your book to the README.md file, remember to not add the same book to the file.
- Add your files and commit
- Now finally push your changes
- Merge your repo with the main repo
TIP ā If you are using vs code then you can simple check the book in the list before adding a new book with CTRL+F
If you have successfully completed all the above steps, congratulations letās celebrate š or in case of any problem please donāt hesitate to contact me on my telegram account š
ā letās make a night to remember ā
Hashhhh Finally we have made some open source contributions and you are ready to embark on the journey.
Do I forget something š¤ oh yes yes as I recall, I havenāt shown you how to find and fix an issue.
For that wait for my next article and I promise it will be worth your time š
In the Next article, weāll cover
- What is the issue?
- Types of issues?
- How to find an issue?
- Finally how to fix the issue?
In the meantime, you can watch Pyacho-PassĀ (Ā notĀ forĀ kids šĀ )Ā , a stunning anime series āš».