I think, fundamentally, open source does tend to be more stable software. It’s the right way to do things. — Linus Torwalds
This article can be used as a tutorial to start open source contribution. It contains the content that was used in one of my webinars, “KickOff To Open Source”. The webinar was based on how to start open source contributions, and it covered the basics of Git and GitHub. You can see the presentation at http://madhavbahl.tech/opensource/ . There will be more webinars, meetups and tutorial videos and articles soon, to get notified directly in your email, subscribe here.
After hearing “open source”, the first thing that comes to our mind is free software, isn’t it? Most of the people are business minded and go for profit, but open source is free right? Still, there is a huge community of open source developers out there, and there are countless awesome reasons behind this.
Open source is in your best interest, whether you are an individual, an organisation, a small business, or a non-profit organisation. There are many reasons you should start an open source project, or start open source contributions as an individual. Some of the reasons I like the most are:
And the reason I love open source,
Each and every project you can find on GitHub (of course which is not private) is an open source project.
Therefore, to make contribution, you just need to find a project that suits you, and an issue to work upon.
Yes, and I am happy spreading this feeling of love.
Generally people have a mindset that they need to be very expert in every (or any one) domain to start open source contributions. This is WRONG! Even if you are a beginner and you have a basic knowledge of Git and GitHub, you can start contributing.
Photo taken from https://www.wired.com/2013/03/github/
Before proceeding further, I highly suggest that you should have a basic knowledge of Git and GitHub. If you are new to this you can read my 2 part tutorial series on the same:
GIT Good: A Practical Introduction to GIT and GitHub (Hello GitHub)_This is a two part series on GIT and GitHub, → GIT-Good Part-A: Hello GitHub GIT-Good Part-B: In Git we trust! You…_codeburst.io
GIT Good: A Practical Introduction to GIT and GitHub (In GIT we trust!)_This is a two part series on GIT and GitHub,GIT-Good Part-A: Hello GitHub → GIT-Good Part-B: In Git we trust! You…_codeburst.io
After reading these two articles, you can watch this YouTube video to have a great insight on Git commands.
Follow these 6 basic steps and make your first open source contribution in 2 minutes.
First step for starting open source is obviously, finding an open source project to contribute to!
Either you can go for contributing the project os some open source organisation like fossasia etc. Or, you can find your projects/issues you want ot work on from these websites.
Although you can find projects to contribute to from the above mentioned resources, it is better to find any open source organisation and start contributing to their projects.
You can find some good open source organisations here.
Also, you can find some good organisations whose projects were selected for GSoC this year and start contributing to their projects.
Google Summer of Code_Edit description_summerofcode.withgoogle.com
You Can Make Your First Open Source Contribution In This Practise Repository: https://github.com/Logic-Xcution/Kickoff-To-Open-Source
Logic-Xcution/Kickoff-To-Open-Source_Kickoff-To-Open-Source - Guide for your first open source contribution!_github.com
Once you have found the project which you want to contribute to, follow these 5 simple steps.
Fork this repo by clicking on the fork button on the top of the page. This will create a copy of this repository in your account.
Clone the repo to your machine. Go to your GitHub account, click on the clone button and then click the copy to clipboard icon.
Open a terminal and run the following git command:
git clone "Copied URL"
Go to the directory where you cloned the repo.Create a new branch using git checkout
command
git checkout -b <branch-name>
for keeping a standard, let’s have the name of branch as username
for example:
git checkout -b MadhavBahlMD
Make the necessary changes, commit and push your code to GitHub. Here, we are adding our username, name and bio in the CONTRIBUTORS.md
To make commit and push changes,
git add .git commit -m "Add [username] as a contributor"git push origin <branch name>
If you go to your repository on GitHub, you’ll see a Compare & pull request
button. Click on that button and submit the pull request!
Soon your changes will be reviewed and the PR will be merged if the changes are legit!
Congrats, You just made your first PR.Welcome to the world of open source.
First of all, switch to the master branch, master branch is the main working branch which is supposed to have most updated code!
git checkout master
Now, add original repo’s url as a new remote, say original
git remote add original [email protected]:Logic-Xcution/Kickoff-To-Open-Source.git
This is a way of telling git that another version of this project exists in the specified url and we’re calling it original
. Once the changes are merged, fetch the new version of original repository.
git fetch original
Now, you need to merge the new revision of my repository into your master branch.
git rebase original/master
Now you can push these changes to your GitHub repo:
git push origin master
Also, since your changes are merged and your repo is updated, the branch you created for your contribution is no longer required and you can delete it!
git branch -d <brach-name>
git push origin --delete <branch-name>
By following this step 7, you can make sure that your copy of the project is same as the original project to avoid any conflicts in future.
Found the article helpful?
TheLeanProgrammer | Subscribe_A Cadet Who Codes | A guide, teacher and mentor for those who want to learn programming and development, subscribe to be the first one to hear from me._http://madhavbahl.tech
Subscribe to TheLeanProgrammer to be the first one to get notified from me for future updates.
Feel free to reach out to me anytime if you want to discuss something :D
I would be more than happy if you send your feedbacks, suggestions or ask queries. Moreover, I love to make new friends and we can be friends, just drop me a mail.
Thanks a lot for reading till end. You can contact me in case if you need any assistance:Email: [email protected]: http://madhavbahl.tech/Github: https://github.com/MadhavBahlMDLinkedIn: https://www.linkedin.com/in/madhavba_hl/_