One of the most important and helpful concepts is
open source. It keeps our field, specially software, dynamic and active. Every developer should contribute in an open source project. Technologies and tools like React & Lodash are open source and waiting for contribution to enhance it and keep it efficient and great. Let's see how is it going...
What's open source?
Why is it so important to know?
How to contribute to open source projects?
How to manage a community of open source?
Open source in simple words, is the project or software where the source code is distributed under a license that allows anyone to study, enhance and modify it.
Open source is very important for any developer or anyone writes a single line of code and that's for the following reasons:
You have the right to control the project and use it for your own purposes. You can do anything that's satisfy you and makes you happy. Of course this is all under licenses, but in general you can modify it as you see it's suitable.
Open source projects considered secure as all the vulnerabilities are being fixed and solved. For example, Linux considered more secure than Windows, that's because linux is open source and all bugs are being fixed immediately.
This is the most important point. Looking for others code and see their logic and how they implement specific features will definitely make you gain a good experience and makes you a better programmer. To be able to edit other's code, you should know and understand how they write this code and know also the language they wrote with.
- Self branding:
By contributing to open source, people will notice your work and start knows you, which increase the chance to be hired.
By making a project open sourced, you ensure that all bugs are being fixed and your code is reviewed well. Also you get new ideas and new features you can add to your project.
To contribute to an open source project, there's 2 steps you should go through:
Before contribution for any project you should know what's the project first. You should know what's the languages used in this project, what's the level should I be in to contribute. Also the most important step is to read the contribution guide that the maintainers put on their repository, for example, is FreeCodeCamp repo there's CONTRIBUTING.md file that you should read first before you start to contribute.
To start contributing you should pass through some steps:
- Fork the repo to your own profile, so you can push to it later.
- Clone the repo to your machine by opening a new folder and open the
git bashon it/ or the terminal if you are on
linuxby clicking on
clone or download button.
Then, write in the terminal:
git clone the-link-of-the-forked-repo
This an optional step but it's necessary to make every thing clean and organized, write the following in the terminal:
$ git checkout -b edits-branch
edits-branch is an optional name you can write whatever you want.
- Start to edit and make your own awesome work.
After finishing your edit, you should then commit the changes:
$ git add . $ git commit -m "Write a descriptive message about your edit"
- Before pushing your changes, you should be in sync with the original repo to make sure your changes don't harm anything in the project, so, you should link your local repo with the main repo you forked from.
$ git remote add main the-link-of-the-main-repo
Notice that I named the remote branch
main, you can name it what ever you want.
- Push your changes to the forked repo.
$ git push origin edits-branch
Notice that I pushed the
edits-branch because we branched it before.
- Pull request.
Now, make a pull request to make your changes public.
You will be redirected to this page to compare changes and
create the pull request
Write a descriptive title and a description for you
PR, then click
create pull request.
Then, you'll be redirected to the original repository to the
pull requests tab.
- Be patient.
Don't be in a hurry, the maintainers of the repo are volunteering, they don't get paid, so be patient about any requested edits, late reply or even close your
PR. Don't stop contributing and make the world of the software better.
Start contributing to open source projects and make the world a better place with your awesome work.