Open source, How to contribute to open source projects

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 we'll talk about

  • 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?

What's 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.

Why is open source so important?

Open source is very important for any developer or anyone writes a single line of code and that's for the following reasons:

  1. Control:

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.

  1. Security:

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.

  1. Training:

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.

  1. Self branding:

By contributing to open source, people will notice your work and start knows you, which increase the chance to be hired.

  1. Community:

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.

How to contribute to open source projects?

To contribute to an open source project, there's 2 steps you should go through:

  • Analyze.

  • Contribute.

Analyze

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.

Contribute

To start contributing you should pass through some steps:

  1. Fork the repo to your own profile, so you can push to it later.

Fork button

  1. Clone the repo to your machine by opening a new folder and open the git bash on it/ or the terminal if you are on linux by clicking on clone or download button.

Cloning

Then, write in the terminal:

$ git clone the-link-of-the-forked-repo
  1. Branching.

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.

  1. 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"
  1. 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.

  1. Push your changes to the forked repo.
$ git push origin edits-branch

Notice that I pushed the edits-branch because we branched it before.

  1. Pull request.

Now, make a pull request to make your changes public.

pull request

You will be redirected to this page to compare changes and create the pull request

Compare the changes

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.

  1. 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.

Conclusion

Start contributing to open source projects and make the world a better place with your awesome work.

Sources

Programming Concepts#Programming Concepts

Comments (0)