How To Contribute To An Open Source Project Github

Open source projects are one of the cornerstones of the internet, making everything from modern shopping websites to the software on your laptop possible. But how can you get involved? This guide will show how to contribute to an open source project.

Have you ever wanted to jump into an open source project, but didn’t know where to start? Maybe you’ve found a bug and want to fix it. Or maybe you want to help make something but don’t know what to do or where to go. Whatever the case, in this tutorial I’ll show you how to quickly find what you’re looking for and how to get started.

Clone the forked repository to your machine

Now we need to clone the forked repository to our machine so that we have a local copy of the code. Click on the clipboard icon next to the SSH or HTTPS URL of your forked repository to copy it.

Now open a terminal on your machine and run the following command to clone the forked repository:

git clone git@github.com:theawesomenayak/guava.git

Understanding how a project works

Not all open source projects operate in the same way. Some allow contributions from anyone. Some require you to work your way up to get contribution privileges. Some have multiple people involved in managing a project. Others have a single person in charge, a so-called benevolent dictator for life. 

Contribution guidelines help you understand how to approach your participation in a project. It will explain how to reach out about a contribution, provide templates for communicating bugs and suggesting features, list work that is needed by maintainers, project goals, etc. An amazing example is the Angular contribution guide which lists all kinds of useful information for new contributors like their commit message guidelines, coding rules, submission guidelines, etc. in great detail. 

In addition to contribution guidelines, some projects will have a code of conduct. It usually outlines community rules and behavior expectations. It’s meant to help you know how to be a amiable and professional contributor and community member. Angular, for instance, has an awesome code of conduct that lists what they consider unprofessional conduct, their responsibilities to the community, and how to get in contact in case someone violates it.   

Big projects may have governance policy and team documents that outline specific roles in the community, teams, sub-committees, contribution workflows, how discussions are conducted, and who gets to commit. These kinds of documents are essential to understanding how the community operates. The about page on angular.io, for example, lists who all the core team members are, their roles, and other contributors. On Github, they also have a docs folder containing policies regarding contribution.  

Even after you’ve gone through the documentation, you may still need to ask questions to active members of the community. Despite doing your research, you may still be stumped on a particular aspect of the project. To interact with other contributors, join community communication tools like Slack, IRC etc., sign up for newsletters, and subscribe to their mailing list. Angular uses Gitter as its community communication tool and directs contributors with questions/problems to Stack Overflow, where they can get help using the angular tag. Connect with community members and develop relationships with them as it will expose you to facets of the project that you may be unaware of. 

Having a good grasp of the technical aspects of the project and how it’s organized is essential to making contributions that meet the project’s standards. To understand technical parts of the project, consult the project README, wikis, tutorials, and documentation. Angular, for example, has docs explaining their Github process, building and testing, their coding standards, debugging, PR reviews, etc. Going a step further, look at past feature integrations and bug fixes in merged pull requests which are full of discussions by other contributors and can be a rich source of context. As the project evolves, pay attention to it, frequently follow issues, features, discussions, pull requests, and bug fixes to continually learn how it works. For instance, a contributor can follow this example of an Angular feature request discussion about a form API to better understand how Angular forms work, bundle size management, etc.

An open source project is sort of like a project at any company you might work at; there will be a house coding style, team culture, and workflows for getting things done. The difference is that open source projects can and will have a much different group of people working on them. 

Must have elements in all OS projects

When talking about an OS project, they are categorized in several ways depending on structure, type of product platform, programming language used, whether it’s sponsored or fully independent, and more.

All this info should be outlined with the help of the guidelines and information:

  • License
    If a project does not have an open-source license, then it is not open source. The license helps protect contributors and users. Businesses and savvy developers usually won’t touch a project without this protection. If you’re wondering how to get one and choose the correct one for your project, check out the official OS license website: https://choosealicense.com/.
  • README file
    This is a manual that explains how to get started with a project. It lists the requirements for contributing to the project, the steps to take to contribute to the project etc… A good README should contain everything a potential contributor would want to know about the project. If you already have a project and you’re trying to write a good README file, this guide will come in handy: How to write a good README file.
  • Contribution Guidelines
    These are guidelines that help people who contribute to the project know exactly what is expected from them. And even though it’s not mandatory is always a good practice to add one. If you need help writing one or understanding what it entails, the official OS website has a template guide to help you out: Contributor guidelines template
  • Code of Conduct
    A code of conduct is a document that establishes your expectations for how your contributors and participants behave. Adopting and enforcing a code of conduct can help create a positive and welcoming environment for your community. The OS guide explains more on what it entails: https://opensource.guide/code-of-conduct/.

As an individual or an organization running an Open-Source project, it’s all about creating a community where people can grow together. This means that you will have to develop a friendly environment where people will get to share ideas, work on challenges, and even have random chats at some time.

There are some go-to options here, and you can use tools like:

  • Issue Tracker
    This is where you keep track of your work on GitHub, and how development happens. In case there’s any problem a contributor can create an issue and link it to a pull request and fellow contributors can opt in to try and fix it. Then after it’s fixed it’s closed.
  • Pull Requests
    They let you tell others about changes you’ve pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with the collaborator and add follow-up commits before the’re merged into the base branch.
  • Chat Channel
    Although it’s not mandatory, you can consider it a good practice to be part of an OS community channel. It is specifically meant for people to share their ideas and have conversations. Some of the most common media for this purpose include Slack and Discord.

So, now you have an idea of what an OS project is and what to expect when you contribute to one. Moving into the most important part, how do you know which project to contribute to?

Finding projects to work on

One way to find projects to work on is to look to open source software you use often and like. Is there a tool, package, framework, or a language that you work with regularly and enjoy using? Find out whether it’s an open source project by checking its license and if it accepts contributions and is active. Working on things you already use gives you an edge when contributing because you’re already pretty familiar with how it works and have experience using it. As a bonus, you can address problems that have been bothering you or suggest features that you want in the software. If you are going to contribute code to the project, be sure you can work in the language it’s written in. 

If the above approach may not work for you, try using the Github explore page to find projects that are accepting contributions or actively want help. Github suggests projects you may like based on people and repositories you follow, star, and watch. Another way to find projects is to use Github’s search tool by entering beginner-friendly contribution tags like good-first-issuegood-first-bugbeginner-friendlyeasylow-hanging-fruitfirst-timers-only, etc. Filter search results to return issues in open states and in the languages you’d like to work in. There are tons of other tools, platforms, and programs where you could find open source projects that I’ll list at the end of this article to help you with your search. 

To have a positive contribution experience, try to avoid communities that are hostile to beginners and generally problematic. If for example, when trying to ask legitimate questions after you’ve done your research, you receive dismissive and combative comments or insults, it’s best to stay away. Another sign to be watchful for is a pattern of unprofessional behavior within a community. Some open source software projects have been infamous for this sort of thing. So do your research before contributing.  

Conclusion

If you have found a source that uses an open source project and would like to contribute back to the project, this guide will help you find what you need. We’ll take a look at the different ways that both individuals and corporations can contribute to an open source project on Github.

0 Comments

No Comment.