Why senior folks always focus on open source contribution, there might be some benefit right. Yes there is. Open Source Contribution can really change your thinking to read the code which is written by others đ (as I guess this is the most difficult task for a developer). Jokes apart there are a lot of benefit of open source contribution i.e You start reading other codes which help you to know how other writes code. You will get a chance to learn multiple new things which used in that project.
This article is not about what are the benefits of OSC but how to start Open source contribution. If you want to start open source contribution then this is the best article to start with. In This article I have added a step by step guide on how to start your open source contribution journey
You can follow me on Instagram for more such contents
https://www.instagram.com/thesmartcoders
Step 1: Understand What Open Source Is
Before contributing, itâs important to understand what open-source software (OSS) is. Open-source software is software that is freely available for anyone to use, modify, and distribute. Projects like Linux, JMeter, Kafka, Kubernetes, and Spring Boot are examples of open-source software.
You can read more about open source at the https://www.youtube.com/watch?v=SXW_bA4SGqA
Step 2: Learn the Basics of Git and GitHub
Most open-source contributions are made using Git and GitHub (or similar platforms). So You should have a solid understanding of:
- Git: The version control system used to track changes in code.
- GitHub: The platform that hosts repositories where open-source projects live.
Here are some resources to get started:
- Official Git Documentation
- https://learngitbranching.js.org/
- https://www.atlassian.com/git/tutorials
- https://www.w3schools.com/git/
Step 3: Choose the Right Project
Itâs essential to find a project that matches your interests and skills. And most importantly that project have some issues which are open and simple. As you are fresher so don’t directly start solving complex issues. You will waste your time only. Hereâs how you can find the project under your interests:
- Explore repositories on GitHub Explore.
- Look at GitHub trending projects.
- Use websites like Up for Grabs and First Timers Only to find beginner-friendly open-source projects.
Step 4: Understand the Project
Once youâve found a project, you need to get familiar with it:
- Read the README: The README file will give you an overview of the project, its purpose, and how to use it.
- Check the contributing guidelines: Look for a
CONTRIBUTING.md
file which outlines how you can contribute. - Understand the issues: Look at the projectâs issue tracker (on GitHub, itâs under the âIssuesâ tab). Many projects label issues with tags like
good first issue
,beginner-friendly
, orhelp wanted
.
Hereâs an example of a contributing guideline from Spring Boot: Spring Boot Contributing Guide.
Step 5: Fork the Repository
Forking means making a copy of the repository under your own GitHub account. So you should also have a git hub account and git bash installed in your system. You will work on this fork, and later request to merge your changes into the original project.
- On GitHub, navigate to the repository and click the Fork button in the top-right corner.
- This creates a copy of the repository in your GitHub account.
Step 6: Clone the Forked Repository Locally
To start working on the project, clone the repository to your local machine:
git clone <https://github.com/YOUR-USERNAME/PROJECT-NAME.git>
Replace YOUR-USERNAME
with your GitHub username and PROJECT-NAME
with the name of the project.
if you are new to github then must check out this video : https://www.youtube.com/watch?v=Ez8F0nW6S-w&t=2670s
Step 7: Set Up the Development Environment
Follow the instructions in the projectâs README or CONTRIBUTING.md
to set up the project on your local machine. This could involve:
- Installing dependencies (e.g.,
npm install
,mvn install
). - Setting up a development environment (e.g., IDE, Docker).
Step 8: Create a Branch
Before making any changes, create a new branch. A branch allows you to work on your changes separately from the main codebase:
git checkout -b my-feature-branch
The name my-feature-branch
can be anything that describes the feature or bug you are working on.
Step 9: Start Working on the Issue
Youâre now ready to start making changes. Make sure your changes:
- Address the issue or enhancement youâre working on.
- Follow the coding standards of the project (many projects use
prettier
orcheckstyle
for code formatting). - Include tests if necessary.
Step 10: Commit and Push Your Changes
Once youâre happy with your changes, commit them:
git add .
git commit -m "Fixes [issue-number]: Brief description of the change"
Make sure to reference the issue number in the commit message if applicable.
Push the changes to your GitHub fork:
git push origin my-feature-branch
Step 11: Submit a Pull Request (PR)
Now that your changes are pushed, you can submit a pull request to the original repository:
- Go to the repository you forked.
- Click New Pull Request.
- Select your forked branch (
my-feature-branch
) as the “compare” branch and the projectâs main branch as the “base” branch. - Provide a clear description of what your changes do, linking any related issues.
GitHub documentation on pull requests: About Pull Requests.
Step 12: Respond to Feedback
Once your pull request is submitted, project maintainers may review your code and request changes. Be open to feedback and iterate on your pull request:
- Implement requested changes.
- Update your pull request with the new changes (
git push
will automatically update the PR).
Step 13: Celebrate Your First Contribution
Once your PR is merged, youâve officially contributed to an open-source project! đ
Step 14: Continue Contributing
- Look for more issues to work on.
- Get involved in discussions and contribute in other ways, such as improving documentation or helping others in the projectâs community.
Helpful Tools and Resources
- GitKraken: A graphical Git client to manage repositories (GitKraken).
- Sourcetree: Another Git GUI for simplifying version control (Sourcetree).
- Gitter: A chat and networking platform for developers contributing to open source (Gitter).
Final Tips for Newbies
- Start small by contributing to documentation or fixing minor bugs.
- Donât be afraid to ask questions; open-source communities are usually friendly and supportive.
- Keep contributing regularly to build experience and confidence.
Free Videos For Open Source Contribution
I hope this article helped you to do your first Open Source Contribution. Let me know in the comment if you have any query regarding this article or any things which mentioned in this article. I would be happy to help you.