5-Step Guide to make your First Open Source Contribution | Hactoberfest!!
A short and to the point Guide for 1st Open Source Contribution
Let’s Start , So If you are a beginner having no knowledge about How to contribute in Open Source, No Problem. In this blog i will tell you everything that you need to know that how to make your first contribution in Open Source from scratch and it will remove all your doubts regarding how you should start . Go through next 5-steps and you will be onboard in Your Open Source Journey. ️🔥😊
Prerequisites -
- Git install from GitDownload Learn from Udacity Version Control Git
- GitHub Account Creat Account learn From GitHub
Get familiar yourself with terms like Fork , Clone , Repository and GitHub Dashboard.
1. Fork Main Repository
Forking the repository means creating a copy of it in your account. For forking the Repository go through this Repository and Fork it. Click on the fork button at the top of the page to create a new fork. This forked repository will be now available in the “Repositories” section in your account.
2. Clone This Repository into your Local System
Now clone the forked repository for make it available offline or in your machine by which we have a local copy of our forked repository. Click on the clipboard icon next to the Https Url of your forked repository to copy it.
After Copying Url Open your Git Terminal on Desktop and Run this command to clone the forked repository.
git clone "url you copied"git clone https://github.com/sharmapradyumn/First-Contribution-Dashboard.git
3. Create A Branch and Commit Changes
Why → While making any change to the main repository code, a best practice is to create a new branch for the changes we need to make. This ensures that we keep the master branch clean, and are able to simply revert our code or make updates when necessary.
Now create a branch using the git checkout
command.
git checkout -b <add-your-new-branch-name>
example -> git checkout -b my-first-contribution
But till now you have not changed anything in our cloned repository so Now open My_Contributon.md
file in a text editor, add your information in below format and save it.
```
your name-
college name -
first contribution experience till now```
If you go to the Git terminal and execute the command git status
, you'll see the changes.
Add those changes to the branch you just created using the git add
command:
git add My_Contributon.md
Now commit those changes using the git commit
command:
git commit -m "<your-name> "write your name in place of <your-name>
4. Push Changes to GitHub
Why Push → Whatever changes we have made in our local system so for making those changes visible in our forked repository we need to push our changes to GitHub .
Push your changes using the command git push
:
git push origin <branch-name>example -> git push origin my-first-contribution
replacing <branch-name>
with the name of the branch you created earlier.
5. Submit your changes for review Or Create a Pull Request
Now go to the GitHub and check your forked repository you will see Compare & pull request
button. Click on that button….. Boom🔥🎉🔥🎉 You have created your first PR(Pull Request).
Now submit the pull request.
If the Changes you have made are good and no conflicts with master Branch Project maintainer will merge them to the main repository. You will get a notification email once the changes have been merged. Congratulations🎉🎉🎉!! You are now officially an open-source contributor.
Congrats! You just completed the standard fork -> clone ->Branch-> edit -> Push->PR Cycle that you’ll encounter often as a open source contributor!
Now what Next →
- Find Beginner friendly Open Source Project Here
- Follow Open Source Contribution Cycle and Project Contribution Guide
- Do More Learn More
That’s it, hope you found the post useful!
Feel free to reach out to me anytime .😊
Feedback and suggestions are Welcome .
Email: pradyumnsh007@gmail.com
LinkedIn: https://www.linkedin.com/in/pradyumn-sharma-59782a15a/
Github: https://github.com/sharmapradyumn