DEV Community

Cover image for Make Your First Open Source Contribution
Vansh Sharma
Vansh Sharma

Posted on

Make Your First Open Source Contribution

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 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

Step 1:

Fork the repository you want to contribute for in this case we are using First Contribution.Because this repo was made to help people begin their open-source contribution.

Screenshot (564).png

Step 2:

Clone the repository to your local machine using

git clone URL
// URL: Copied from your Github account of the forked repo.
Enter fullscreen mode Exit fullscreen mode

Screenshot (565).png

Screenshot (566).png

Step 3:

Change the directory using

cd first-contributions/
Enter fullscreen mode Exit fullscreen mode

and use code . it will open your code editor.

Screenshot (567).png

Step 4

Create a shortcut for your URL

git remote add origin URL
//URL  copied in Step 2
Enter fullscreen mode Exit fullscreen mode

Here "origin" is your shortcut also you can use any other name other than "origin".

Screenshot (568).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
Enter fullscreen mode Exit fullscreen mode

This will help you submit the changes in the original repo after your Contribution

Screenshot (569).png

Step 6

Create a new branch

git checkout -b BRANCH_NAME
// Branch name: Add-Vansh-Sharma
Enter fullscreen mode Exit fullscreen mode

You can give any name what you want but following the rules of the repo.

Screenshot (570).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
Step 9

Now it's time to push the changes

git push origin BRANCH_NAME
Enter fullscreen mode Exit fullscreen mode

Screenshot (572).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

Screenshot (574).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

Connect with me πŸ‘‡

Twitter LinkedIn Gmail DEV

Discussion (0)