How to Contribute to an Open-Source software?๐Ÿค”

How to Contribute to an Open-Source software?๐Ÿค”

Hey guys, Good to see you here. In this article, we are going to learn how to contribute to an open-source project.

op3.gif

If you are a beginner, at the start It feels a bit intimidating but I will guide you through the process. First of all, let's see

What is OPEN-SOURCING?

Open source refers to a software program or platform with source code that is readily accessible and which can be modified or enhanced by anyone. Open-source access grants users of application permission to fix broken links, enhance the design or improve the original code.

Let's say you use open-source software and you wish some features could be added to enhance the software. You can add/contribute through code.

Long story short - Open source is for the community by the community.

Let's start the process :

First of all, you need a Github account to start with. Github is a place where all the open-source code bases are maintained. So, create a Github account first and then continue the article.

We need a git version controller installed on our computer, which will help us to track and commit our project.

If you have done both of the above tasks, you are good to go.

STEP 1

Step 1 of the process is to fork the remote repository to your repository by clicking the fork button and cloning it into your system.

op1.png

Click the fork button, after clicking it the whole code base will be copied into your repository and clone it into your system.

STEP 2

Step 2 is to create a branch and checkout to the created branch.

We create branches for security purposes, to do not disturb the master branch in the first place while we are making changes.

We are so concerned about our master branch - The actual branch. We will do changes without affecting the master branch and at last merge it with it.

To create a branch, open the terminal go to the path of the cloned folder, and enter the below line

git branch <branch-name> // give any name of your own for the branch eg. git branch branch1

we have created a branch, now we should move into the branch for that

git checkout <branch-name> // eg. git checkout branch1

now we have moved into the branch we have created from the master branch.

Now you are good to do the changes you want to do and enhance the software or solve any bugs or errors.

Once you are done with your work. It's time to push it to Github.

STEP 3

Step 3 is to add the files and commit the changes you have made.

For the version controller to know, which file/s are being modified/changed we should write the git add command to keep track of it.

git add <file-name>

Now we have added the files we have made changes. The next step is to commit the changes. To commit our changes we write.

git commit -m "y-o-u-r m-e-s-s-a-g-e" // eg. git commit -m "2 files added"

to check the added files:

git status

STEP 4

Step 4 is the final step, where we want to merge and push the updated codebase to our local repository.

  git push --set-upstream origin <branchname>

The above line will merge our branch with the master branch in our local repository. Once you have done with the line a link for a Github will be provided to pull a request.

op2.png

you can write a message on what changes you have made and click the pull request button. A message will be sent to the maintainers of the project/software, once they reviewed your code. They accept your request and merge it with the actual software.

That's it you have made your first open-source contribution. congrats โœŒ๏ธ.

OUTRO

I hope this article is useful to you, that you have learned something new. I recommend you to go with good-first-issues to start with in the issues section and get used to it. At first handling, a huge codebase seems intimidating - Don't give up.

related resources:

Thank you for reading ๐Ÿ˜Š

HAPPY LEARNING

-JHA

ย