A Beginner's Guide to Open Source Contributions💻
Hey folks, if you are wondering how to start your open-source journey, this article will help you do that.
Here are steps to begin your open-source contribution journey. All the best.
Fork the repository
Fork this repository by clicking on the fork button at the top of this page. This will create a copy of this repository in your account.
Clone the repository
Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the copy to clipboard icon.
Open a terminal and run the following git command:
git clone <url you just copied>
where "URL you just copied" is the URL to this repository (your fork of this project).
For example:
git clone git@github.com:this-is-you/Thoughtify
where this-is-you(DexAsHisH)
is your GitHub username. Here you're copying the contents of the Thoughtify repository on GitHub to your computer.
Create a branch
Change to the repository directory on your computer (if you are not already there):
cd Thoughtify
Now create a branch using the git switch
command:
git switch -c <add-your-new-branch-name>
For example:
git switch -c add-new-feature
Make necessary changes and commit those changes
Now, resolve issues, make the necessary changes to your file, and save the file.
If you go to the project directory and execute the command git status
, you'll see there are changes.
Add those changes to the branch you just created using the git add
command:
git add <file-name>
Now commit those changes using the git commit
command:
git commit -m "Add a descriptive message"
Push changes to GitHub
Push your changes using the command git push
:
git push origin <your-branch-name>
replacing your-branch-name
with the name of the branch you created earlier.
Submit your changes for review
If you go to your repository on GitHub, you'll see a Compare & pull request
button. Click on that button.
Now submit the pull request.
Soon, they will merge all your changes into the main branch of this project. You will get a notification email once the changes have been merged.
Congrats! You just completed the standard fork -> clone -> edit -> pull request workflow that you'll often encounter as a contributor!
Subscribe to my newsletter
Read articles from Ashish Dabral directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ashish Dabral
Ashish Dabral
I am a student, who loves writing technology articles and learning in public.