An Interest In:
Web News this Week
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
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
.
After clicking Fork
, another page pops up. Click on Create fork
.
You now have that same repo in your list of repositories on GitHub. This is what it looks like:
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.
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
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:
Click on compare & pull request from the previous.
Alternatively, click on Pull requests
Click on New 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
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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To