Make Your First Open Source Contribution
Tags: opensource, github, githunt
Published: 2021-07-08 11:16:00

This Blog is part of my **4 Blog** series in which I tell you about **Git and Github**. But in this blog, we are going to talk about something very important and dear to developers i.e.

 ***Open Source Contribution***
> Open-Source Contribution involves contributing to the development or improvement of open-source software.

I know, I know you might be wondering that you are not good at programming language then let me tell you 1 secret even I am not that good at any particular language still I contribute **bcoz** you don't need to be expert to contribute to Open Source. You can always contribute to documentation or you can manage repos or you can share repos on social media or in any other simple way. So Let's see how can we contribute to Open Source.

## **Open Source Contribution**

***NOTE:*** Before starting contribution you should always read the `Readme.md` file, because there are some rules and regulations you, have to follow before making any changes. So make it a compulsory step to always read `Readme.md`.

**Step 1**: 

Fork the repository you want to contribute for in this case we are using  [First Contribution](https://github.com/firstcontributions/first-contributions).Because this repo was made to help people begin their open-source contribution. 

![Screenshot (564).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625408087107/zxkbefRix.png)

**Step 2**:

Clone the repository to your local machine using
```
git clone URL
// URL: Copied from your Github account of the forked repo.
```

![Screenshot (565).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625408984961/JXiPPi4HN.png)

![Screenshot (566).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409017720/FT2mqy_5i.png)

**Step 3**:

Change the directory using
```
cd first-contributions/
```
and use `code .` it will open your code editor. 

![Screenshot (567).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409086480/TeFTPAHJw.png)

**Step 4**

Create a shortcut for your URL 
```
git remote add origin URL
//URL  copied in Step 2
```
Here "origin" is your shortcut also you can use any other name other than "origin".

![Screenshot (568).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409140434/_eD1vQ-aF.png)

**Step 5**

Now go back to original repo (**From where you forked this repo**) and copy the link from *clone or download option*
```
git remote add upstream URL
// URL just copied
```
This will help you submit the changes in the original repo after your **Contribution**

![Screenshot (569).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409167744/KbDK3Cpjw.png)

**Step 6**

Create a new branch 
```
git checkout -b BRANCH_NAME
// Branch name: Add-Vansh-Sharma
```
You can give any name what you want but following the rules of the repo.


![Screenshot (570).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409189676/1qoUWltiB.png)
**Step 7**

Make some changes like in this case you just have to add your name.


**Step 8**

After making changes:
- Stage your changes using: `git add .` This will stage all the changes you made in the file.
- Commit your changes by giving some message for all changes you have made. `git commit -m "Added Vansh Sharma"`



![Screenshot (571).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409207271/c1dtXNWvS.png)
**Step 9**

Now it's time to push the changes 
```
git push origin BRANCH_NAME
```

![Screenshot (572).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409471300/afMHFKalD.png)
**Step 10**

Now GO back to your Github on this repo and you will see 
- `Compare and pull request` Click on it.
- Add some comments for your changes.
- and then Click on `Create Pull request`.

![Screenshot (573).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409487322/83LTAP-qiy.png)

![Screenshot (574).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625409495950/wrb7pSH5j.png)


**Step 11**

Now once your changes are accepted by the owner of the repo you will get an email for that.

## Voila 🎉
Congratulations you have made your **First Open Source Contribution.**

Now that's all for this blog in the next and last blog of this series I will be sharing  **Cheatsheest, Resources, Beginner friendly open source contribution resources**. So that you can start your OSC journey.

Until then **Keep Learning, Keep Growing**

<h2>Connect with me 👇 </h2>

Twitter|LinkedIn|Gmail|DEV
-------|---------|------|--------
 <a href="https://twitter.com/Vanshsh2701" target="_blank"><img src="https://img.icons8.com/clouds/60/000000/twitter.png"/></a>|<a href="https://www.linkedin.com/in/vanshsharma27/" target="_blank"><img src="https://img.icons8.com/bubbles/60/000000/linkedin.png"/></a>|<a href="mailto:vanshsharma9354@gmail.com" target="_blank"><img src="https://img.icons8.com/clouds/60/000000/gmail.png"/></a>|<a href ="https://dev.to/vanshsh" target="_blank"><img src="https://img.icons8.com/office/50/000000/blog.png"/></a>