A Beginner’s Guide to Making Open Source Contribution
Tags: webdev, opensource, womenintech, 100daysofcode
Published: 2020-05-20 18:32:32

# What Is Open Source Software?

<a href="https://en.wikipedia.org/wiki/Open-source_software">Open Source software </a> is software written by people who share a common goal towards achieving a specified result. The goal of Open Source to publicly continue to improve the source code of a software throught public contribution thus helping to solve the problem of users of the software. We have people with various skillset come together to put their skill to test by inspecting, modifying, and enhancing the source code of a software for better performance.

<h3> Why Open Source Software? </h3>
Open Source authors make the source code of the project available to entire public who would like to view that code, copy it, learn from it, alter it, or share it. <a href="vuejs.org"> Vue.js </a>, <a href="webpack.js.org">Webpack </a>, and <a href= "https://code.publiclab.org/#r=all"> PublicLab </a> are examples of Open Source software. Hence making it readily available to the public and also free to use.

<h3> Becoming an Open Source Contributor </h3>
In this article, I will be walking you through how to start making your Open Source contribution. To get started with this I will be making use of  <a href= "https://code.publiclab.org/#r=all"> PublicLab </a> since they present us a lot of fresh-timers-only issues. Also if you are looking at other options you can find them <a href="https://github.com/MunGell/awesome-for-beginners" > here </a>.

<h3> Requirements </h3>
Version Control System <a href="https://git-scm.com/downloads" >Git </a>
Join <a href="https://github.com/join" > GitHub </a>
Text Editor of choice

<h3> Getting Started </h3>
To get started on contributing to  <a href="https://code.publiclab.org/#r=all"> PublicLab </a>, we will visit their website and proceed with the following steps:

<li> Read about the <a href="https://publiclab.org/wiki/contributing-to-public-lab-software"> contributors guide </a> and play around on the site to have an idea of what they do. 
</li>
<li>Scroll to the <a href="https://github.com/publiclab/plots2/labels/first-timers-only"> first-timers-only issues </a> (helps folks who haven’t contributed to our codebase before, or even folks who haven’t contributed to Open Source before). To further understand more about first-timer-issue here is an <a href="https://kentcdodds.com/blog/first-timers-only">article </a> by <b>kentcdodds</b>
</li>
<li> Fork the repository thereafter to enable you create a copy of the repository where you can begin to work. A sample fork has shown below:
</li>
<img src="https://icodemag.com/wp-content/uploads/2020/03/forked-repo-768x363.jpg" alt="forked publiclab repo">
<li>
Next step is to initiate a clone of the forked repository. The purpose of this clone is to allow us own a copy of the source code in our local machine by downloading it using a git command.
</li>
<img src="https://icodemag.com/wp-content/uploads/2020/03/cloned-repo.jpg" alt="cloned repo">
<li>
Up next we launch the git bash or command line and run git clone <repo name> with .git extension and in our case git clone 
<a href="https://github.com/LarrySul/plots2.git">https://github.com/LarrySul/plot2.git</a>
<img src="https://icodemag.com/wp-content/uploads/2020/03/git-clone-1.jpg" alt="desktop terminal">
</li>
<li>
The clone creates a folder plots2 with all available and required source codes to enable work on the project.
</li>
<li>
Navigate to the plots2 folder and open the git bash or command prompt, this time we will be setting upstream. But why upstream? Upstream will help you monitor for changes and easily syncronize with the forked PublicLab repository.
</li>
<li>
To add a upstream run <b>git remote add upstream </b> <a href="https://github.com/publiclab/plots2"><originial owner of repo></a>
</li>

<li>
To list the currently configured remote repository for your fork use <b> git remote -v </b>

<img src="https://icodemag.com/wp-content/uploads/2020/03/set-upstream.jpg" alt="setting upstream" >

We should have something of such in our terminal now.

</li>
<h3> Looking for an Open Issue to Fix </h3>
On PublicLab they are constantly welcoming first timers who are looking to get started with contributing to Open Source.
<img src="https://icodemag.com/wp-content/uploads/2020/03/open-first-time-PR-768x250.jpg" alt="open issue">
There is a section for that sole purpose, thus clicking on the issues title will redirect to a page where we have a detailed description of what should be done. Link to below image can be found <a href="https://github.com/publiclab/plots2/issues/7702">here </a>.
<img src="https://icodemag.com/wp-content/uploads/2020/03/example-of-the-issue-page-768x464.jpg" alt="Open issue">
After indicating interest and you have been assigned the issue as shown above, carefully analyze and understand what should be done before proceeding to working on it on your local machine using your favourite Text Editor of choice. 
<li>Once you are done fixing the bug, you need to notify the open open source maintainers about the issue via a pull request. To do that head to your terminal or git bash to run the following commands
</li>

<li> git add . </li>
<li> git commit -m "a brief description of what was done" </li>
<li> git status (Why this is need is because we need to avoid conflict, the status will keep us updated if the upstream is ahead thus prompting us to run git fetch upstream and have our project back in sync.) 
</li>
<li> git push origin master
<img src="https://icodemag.com/wp-content/uploads/2020/03/sample-PR-1.jpg" alt="pushing to master">
</li>
<br />
<h3> Creating a Pull Request </h3>
A <a href="https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request" >pull request (PR) </a> is a method of submitting contributions to an open development project. It occurs when a developer asks for changes committed to an external repository to be considered for inclusion in a project’s main repository after the peer review.

<img src="https://icodemag.com/wp-content/uploads/2020/03/open-PR-768x383.jpg" alt="Pull Request">

Once you have initiated the PR you can go back here to signify on completing the task and await your work to be merged. Finally that’s how to go about making your first Open Source contribution.