Get involved in Hacktoberfest and submit a PR to any of the GitHub inspirezone repositories.
Contents
- Introduction
- 1. Be aware of Git and GitHub concepts
- 2. Read the docs
- 3. Donât and Doâs: The etiquette of making open source contributions
- 4. How to find open source projects
- Conclusion
Introduction
Open source generally refers to applications anyone can use for free while also having the freedom to view and modify the source code.
Open source projects also allow contribution from the public. This means anyone (yes, even you!) can modify the source code or make other forms of contribution to the project.
Although open source is certainly open to everyone, there are some unofficial rules and guidelines we should all strive to follow as closely as possible to keep the repositories for open source projects organised.
Letâs go through some key points to keep in mind when youâre making a first open source contribution to repositories on GitHub. This also applies to those who just want to improve on how you interact with public repositories.
As a maintainer of the inspirezone GitHub repositories, experience shows itâs mostly simple rules that need to be followed by those who wish to contribute. Maintainers of repositories will certainly appreciate those that follow these guidelines as it makes the maintaining process much simpler đ
1. Be aware of Git and GitHub concepts
If youâre new to git and to the GitHub platform, there are a few things you need to become familiar with.
As a simple definition, git is a system for managing source code changes and GitHub is an online hosting platform for your git repositories.
There are some features and concepts provided by git and the GitHub platform that play an important role when contributing to open source. Take some time to learn the basics of git as itâs a crucial skill to know for anyone serious about contributing to open source.
Here are some functions of git and GitHub that especially apply when making open source contributions.
Forks
Forking is an important step in making a code change to a public repo. Since you donât have direct access to making a commit to a repo not owned by you, forking allows you to create a copy where youâre free to make your changes first.
Once youâve updated your fork with the changes you want to make to the public repo, you can then submit your changes through a pull request.
Read more about forking in the official GitHub documentation.
Pull requests
Pull requests are a way of submitting changes to a public repo. When you make a pull request, the changes made on your fork of the repo is submitted to the original repo. Maintainers receive pull requests and can review them before deciding to merge your changes.
When your pull request is accepted and merged, it means your changes now become part of the public repository!
Read more about pull requests in the official GitHub documentation.
GitHub Issues
âIssuesâ are a feature of GitHub. They are sections present on a repo page and act like discussion threads to raise any issues relating to the repo project.
In an issue section you can do things like raise bugs, request a feature, ask a question, suggest a bug fix, suggest an improvement or anything relating to the repo.
Depending on what is detailed in the contributing guidelines, raising an issue or requesting to be assigned to an existing issue may be part of the steps involved in making a contribution.
GitHub actions
Be aware that some repos use GitHub actions. These are automated checks that may be run on code you submit to a public repo. They allow repo maintainers to quickly catch any code errors or violations of the contributing rules.
For example, take a repo with guidelines stating submitted code should follow a particular linting formatting (e.g. flake8 for Python). A GitHub action may run to check your code meets the flake8 linting standard. If the check fails, it will be shown on your pull request and youâll receive a notification.
GitHub actions are not limited to just code changes. They can also trigger from your interactions with the Issues section or any interaction you have with the repo.
To be sure your contributions will pass automated checks like this make sure you read the repo guidelines!
GitHub notifications
GitHub will notify you if thereâs any change to the status of your proposed contribution. For example, youâll receive alerts if thereâs new comments in Issues youâve created and for comments and code reviews to your pull requests. Just make sure notifications are enabled on your profile by going to your profile Settings -> Notifications and checking your alerts for various activity.
I thought it was worth noting the importance of GitHub notifications because being notified and responding to comments on your interaction with public projects is an important part of the process. Communication is key to the running of open source projects and this will make sure you donât miss any important updates!
2. Read the docs
Most repositories that are open to the public and welcome contributors will usually have a few documents that guide you on the purpose of the repo and how you can help out. These documents are:
README.md
This file is typically placed on the root page of the repo and is what you are greeted with when viewing the repo files.
The README usually contains a description of what the repo is all about. Depending on the type of repository, it will contain info and steps on how to install and run the application or make use of its content. The README also typically points you to other useful information relevant to the repo.
LICENSE
This file is also typically found on public projects and details the license under which the contents of the repo falls under.
Most public repos will have a simple licence such as MIT that makes the content free to use, modify or distribute. You should pay attention to the license terms if you intend to use some of the repo contents outside of your own private use. For example, for any commercial use or distribution.
CODE_OF_CONDUCT
As the name describes, this is a document that lists the rules and regulations regarding what is acceptable when it comes to your conduct with the repo maintainers and other developers that interact with the repo. Read this and remember to be respectable when interacting with other fellow devs.
CONTRIBUTING.md
This is the key document to read to understand what is involved in making a contribution to the repo.
It will include details such as:
- The types of contributions you can make.
- How to alert the maintainer to the contribution you want to make. For example, you may need to create an Issue first.
- Rules for the submitted code. Pay attention to things like code structure, formatting/linting, files and folder naming standards, requirements for code commenting, any required testing and so on.
- How to issue the pull request. If there are any branch naming or commit messaging guidelines. Some repos will also require filling a pull request template when you submit a pull request.
Following the rules listed in the CONTRIBUTING file are key to improving the chance of your contribution being accepted so pay attention to them!
3. Donât and Doâs: The etiquette of making open source contributions
Donât:
â Donât ignore the repo documents. Pay attention especially to the README.md and CONTRIBUTING.md. Follow them and ensure your contribution meets the repo guidelines.
â Donât make spammy or duplicate contributions. For large repos, pull requests may be immediately marked as invalid if itâs a duplicate of something already being worked on. Itâs also not typically useful to issue a pull request fixing something like insignificant typos in documentation. (Major typos and mistakes in setup commands or the code can be acceptable).
â Donât be afraid to ask a question about something youâre unsure of. Repo maintainers generally welcome your contribution and would be happy to help đ
â Donât limit yourself to just code related contributions. There are other ways you can contribute such as reporting a bug, carrying out tests, writing or translating documentation, suggesting a feature and much more.
Do:
â Do have at least a basic understanding of git. If youâre completely clueless on git, the terms used in the docs and the process of making a contribution might confuse you.
â Do have a considerate mindset. Others will be reading your code and if itâs accepted it will become part of the repo. Keep this in mind when youâre making contributions by adding code. Ideally, add comments and documentation for your changes where needed.
â Do be patient. Refrain from pushing maintainers for an answer immediately as they could be dealing with several pull requests or issues at once. Maintainers may also have a lot to review and consider before providing feedback or merging your pull request.
â Do celebrate if your contribution is accepted!
4. How to find open source projects
Finally, how do you actually find open source repositories youâre interested in contributing to?
Start on the GitHub explore page to search for public repositories. On this page, GitHub will recommend some repositories you might be interested in based on your profile and interests.
You can also search GitHub in more depth and use filters to narrow down on repos looking for contributions based on various filters and criteria. These include the programming language, level of difficulty of the task and various labels that the repos will apply to attract developers.
For example, you can perform a search of repos using a label called âgood first issueâ, which is a popular label used to highlight tasks that are suitable for those new to open source contributing.
To help you get started click this link: is:issue is:open label:âgood first issueâ to perform a âgood first issueâ search on GitHub.
Other label searches you can perform to filter issues that are open and suitable for beginners include: âfirst-timers-onlyâ, âeasyâ, âbeginnerâ, âstarterâ, âup-for-grabsâ, âgood first bugâ, âhelp wantedâ.
Donât give up if you canât find a repo youâre willing to contribute to right away. There are tons of open source projects on GitHub. Keep looking and you will surely come across something that interests you eventually!
By searching for Issues with labels such as âgood first issueâ, you can find tasks that are suitable for those new to open source. There are contributions suitable for everyone so donât be afraid to get involved!
Conclusion
Making an open source contribution shouldnât be scary. Remember that open source is really open to everyone of all skills and levels. The main point to remember is to always follow the guidelines listed by the repo maintainers.
Getting involved in open source is a great way to improve your skills as a developer as youâre dealing with code written by others and can pick up on various programming techniques. Not to mention you can get involved with some truly amazing projects.
If youâre determined to begin making open source contributions you will surely benefit from it.
As some extra motivation checkout the post 10 incredible projects that show the power of open source. Open source shows the amazing things that can happen when developers come together so consider becoming a part of the community đ
Do you have any concerns about getting started with making open source contributions? If youâre a maintainer or make contributions already what advice do you have for others? Comment below!
The inspirezone GitHub community hosts repositories with âgood first issueâ tags. Check them out and consider making your first open source contribution with us! You can also sign up to our community to gain access to discussions with other members and get involved in our portfolio of open source projects in exclusive ways.
Top comments (0)