Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 25, 2023 03:26 pm GMT

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. Its 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 cant 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. Its 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.


Original Link: https://dev.to/odudev/how-to-start-open-source-contribution-as-a-new-developer-3374

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To