DEV Community

Cover image for How to start open-source contribution as a new developer
Afees Oduola
Afees Oduola

Posted on

How to start open-source contribution as a new developer

One of the ways to collaborate, sharpen your skills, and build your portfolio is through open-source contribution. This article will focus on open-source projects. Open-source projects are publicly available for anyone's use, modifications, and enhancements. These projects can be a code base or documentation. If you are starting your career and wondering how to use your new skills, this article is for you.

To completely benefit from this article, you must have a basic knowledge of git and GitHub.

In a few steps, I will take you through how you can start contributing to open-source projects today.

Forking the repository

On identifying an open-source project on Github, fork the repository (repo as often called) by clicking on Fork. You can only replicate a GitHub repository on your own repo using Fork.

Repository Forking

After clicking Fork, another page pops up. Click on Create fork.

Repository Forking

You now have that same repo in your list of repositories on GitHub. This is what it looks like:

Repository Forking

Cloning the repository

Until now, you only have the project on your remote repository. It’s time to have it on your local machine.

Click on Code, then click the double-square box beside the HTTPS URL to copy.

Repository Cloning

Navigate to any directory where you would like to have this project cloned on your computer, right-click on an empty space on the screen, and click on Git Bash Here.

A command window pops up; type git clone, then paste the HTTPS URL you copied earlier and click enter.

Note: You can’t use the keyboard shortcut Ctrl+V to paste the URL; you must right-click and select the paste option

Repository Cloning

You must wait for the cloning to complete. This may take up to several minutes, depending on the folder size. A folder with the repo name will appear in your chosen directory during cloning. Allow the process to complete.

Opening the file in VS code and making contributions

Open the file in VS code. It’s a good practice to always create your own branch while working on an open-source project. By creating your own branch, the project lead will be able to compare your contribution with the main or master branch. This practice allows for a cleaner and more reliable open-source collaboration.

Before working on the project, use the git pull command to update your local repository. This is to update the local repository in case other contributors have made some changes between the time you fork the repo and the time you want to contribute.

Create your branch, make contributions, and push to GitHub.

Creating a Pull request(PR)

On pushing to GitHub, this is what you get:

Pull request

Click on compare & pull request from the previous.

Alternatively, click on Pull requests

Pull request

Click on New pull request

Pull request

In the new line box, type what you did (changes you made). You can also leave some comments. Click on Create pull request

Pull request

Wrapping up

You just learned how to boost your confidence by collaborating and contributing to open-source projects. With your newly acquired skills, you can start contributing to open-source projects. Your contribution can be as little as editing a READ.md file. You can search Google for open-source projects and start contributing today.

Top comments (3)

Collapse
 
kalkwst profile image
Kostas Kalafatis

Hey there! I just wanted to drop by and say great post! For anyone looking to start contributing, be sure to check out this post where people share about their projects and are looking for contributors. It's an awesome opportunity to get involved and make a difference. Thanks for sharing!

Collapse
 
leginee profile image
Peter

Don't forget to talk to people on the Projekt. Learn on the desicion that has been taken in the particular section you want to change. You always learn something you did not consider.

Collapse
 
odudev profile image
Afees Oduola

Great input there. This point can't be overemphasized and that is why it is called collaboration.