DEV Community

Cover image for The only guide to OPEN SOURCE CONTRIBUTION you will ever need.
Adamay Mann
Adamay Mann

Posted on • Updated on

The only guide to OPEN SOURCE CONTRIBUTION you will ever need.

What is the world of OPEN SOURCE ?

There are two kinds of software.

  • Open source software - A software for which the original source code is made freely available and may be redistributed and modified according to the requirement of the user.
  • Proprietary software / Closed source software - Closed source software refers to the computer software which source code is closes means public is not given access to the source code.

Both have their advantages and disadvantages , but in this guide we will be talking about Open Source.

Open-source software is developed in a decentralized and collaborative way, relying on peer review and community production. Open-source software is often cheaper, more flexible, and has more longevity than its proprietary peers because it is developed by communities rather than a single author or company.

Values of Open source

  • Transparency: Need to know exactly what kinds of data are moving where, or what kinds of changes have happened in the code? Open-source allows you to check and track that for yourself, without having to rely on vendor promises.
  • Reliability: Proprietary code relies on the single author or company controlling that code to keep it updated, patched, and working. Open-source code outlives its original authors because it is constantly updated through active open source communities.
  • Flexibility: Because of its emphasis on modification, you can use open-source code to address problems that are unique to your business or community. You aren’t locked in to using the code in any one specific way, and you can rely on community help and peer review when you implement new solutions.
  • Lower cost: With open-source the code itself is free—what you pay for when you use a company like Red Hat is support, security hardening, and help managing interoperability.
  • No vendor lock-in: Freedom for the user means that you can take your open source code anywhere, and use it for anything, at anytime.
  • Open collaboration: The existence of active open source communities means that you can find help, resources, and perspectives that reach beyond one interest group or one company.

Why should YOU contribute ?

Spoiler Alert - Not just for free Tees

  • Makes you a better developer - By contributing to an open-source project, you receive immediate feedback on your development and programming skills. As you create more pull requests and apply what you learned from previous submissions, you begin to learn how to write good code and submit outstanding pull requests for code review.
  • Expands your professional network - Building a robust professional network can help you achieve your career goals, learn more about your own or adjacent fields, and help with a job search. Contributing to open source is an excellent way to build that network. You join a welcoming community of hundreds or thousands of contributors, interact with like-minded developers in the open-source space, and make connections along the way.
  • Builds your resume - Mentioning Open Source contributions on your resume , especially as a fresher leaves an extremely good impression on a recruiter.
  • Opens new doors - Contributing to an open source project may even land you a job! For example, Mattermost has hired several contributors from its open source community to work full-time on the engineering team.

Who is it for ?

Open-source is a field where any person, expert, or novice can contribute and learn on the go. It is known that a person can't master anything. There is always scope for improvement. Hence, the gain comes from practicing repeatedly. It doesn't matter if you are just starting to contribute or a seasoned developer with a high number of contributions. You should always work to better this community by making as many contributions as you can do.


When can you get started ?

NOW !!!

If you are a first-time contributor, which everybody was at some point – here are some links that will get you started in the open-source world :

Looking to contribute after all this open-source knowledge you just got? Do not forget to register in the biggest celebration of the open-source community → HACKTOBERFEST 2022


Start with your First Contribution

This writeup aims to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.

We will be using [git command line]

Fork a repository

Fork a repository on which you wish to work by clicking on the fork button on 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.

clone

Open a terminal in your machine and run the following git command:

where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project).

git clone "url you just copied"
Enter fullscreen mode Exit fullscreen mode

Create a branch

Change to the repository directory on your computer (if you are not already there):

cd [repository-name]
Enter fullscreen mode Exit fullscreen mode

Now create a branch using the git checkout command:

git checkout -b [your-new-branch-name]
Enter fullscreen mode Exit fullscreen mode

Make and commit changes

When you stage changes in a file in the repository, the major thing you need to do is commit those changes. 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 [filename-in-which-changes-were-made]
Enter fullscreen mode Exit fullscreen mode

If you have more than one files and you need to commit all changes, use:

git add .
Enter fullscreen mode Exit fullscreen mode

Now commit those changes using the git commit command:

git commit -m "My first commit"
Enter fullscreen mode Exit fullscreen mode

Push changes to GitHub

Push your changes using the command git push:

git push origin [add-your-branch-name]
Enter fullscreen mode Exit fullscreen mode

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.

Congrats! You just completed the standard fork -> clone -> edit -> pull request workflow that you'll encounter often as a contributor!


Way Forward

Whether you just made your first open-source contribution or you’re looking for new ways to contribute, we hope you’re inspired to take action. Even if your contribution wasn’t accepted, don’t forget to say thanks when a maintainer put effort into helping you. People like you make open source: one issue, pull request, comment, or high-five at a time. Celebrate 🎉 your contribution and share it with your friends and followers. Never stop contributing to the open-source family, as it will help you become better as a developer and programmer. Through Open Source, you will get to meet and learn from some fantastic people and help those who lack some skillset.

Authors

Top comments (0)