You want to contribute to Open Source! That’s amazing! The world thanks you! You’ve already thought it was a good idea and some google searches later, you’re here. Congratulations, let’s get started so you can join the army in making the software world, or the real world a better place!
In 2020, Open Source is the most popular it’s ever been! If you’re a developer or want to get into software development you will eventually come across the term “Open Source”, as a consumer of it and possibly a contributor to it.
Step 1 — Find a project you’re personally invested in!
Step 2 — Find an issue to work on
This one is pretty self explanatory, just go to this issues page of any repository and find an issue you think would be fun to work on. A few good labels to filter by are:
- “Good First Issue”
- “Good First Contribution”
- “Accepting Merge Requests”
- “Beginner Friendly”
These are just suggestions but every repository is a little bit different. The goal is to find issues that are “beginner friendly” and that get you working in the code base, getting used to the development/code review process. It’s entirely possible that the project doesn’t have any of these labels, if that’s the case, reach out to someone or comment on the issue asking if it’s a good first issue to tackle. Sensing a common theme here? More helpful links can be found here.
Step 3 — Claim the issue
This one sounds obvious but it’s not. Time and time again, I see multiple people working on the same issue. If the issue is unassigned OR the issue has been assigned but there hasn’t been any activity on it for a while, then go ahead and make a comment.
Finally, make a comment, something like:
“Hey! I am super interested in taking this ticket on, has anyone else picked this up yet?”
You can literally copy and paste this if you’d like, I wont tell. 😉
If someone has claimed the ticket but there hasn’t been any progress on the issue, still go ahead and make a comment asking if that person was still planning to work on the issue.
Then when you get the go ahead that it’s free to work on, it’s yours, go for it, don’t look back.
Step 4 — Start working!
Fork the project
- Go to the repository and clone, SSH or HTTPS is fine, it really just depends on your local set up.
- Open your terminal in a root directory, like Desktop or something fancy.
git clone link-to-repo
- Then CD or change directory into
- YOU’RE IN!
Add upstream to your git remote
Why? So here’s the deal, big fancy Open Source projects won’t let you push directly to their projects….harsh, i know. There’s a way around this...shhhhhhh
- You’ll need to change your local
git remoteto reference the upstream fork so that you can rebase or merge when code changes in the main repository. This should help you set that up.
Make a branch
git checkout -b your-branch-name— More on this
Update your local environment to make sure its up to date with the parent repo
Why? People are going to keep merging in pull requests into the repo while you’re working. To make sure you have the latest changes in the main repository, do the following:
git rebase upstream/masteror
git merge upstream/master
Do work! Add Your Changes! Commit your changes! Push your work!
- Add and commit your changes using
git add .and
git commit -m 'your message'.
git push origin your-branch-name
- Go to your fork, and open a pull request. You will need to open the pull request from your fork against the main repo like so. Instead of
sstern:masterit’ll be the name of your branch
Step 5 — Get Stuck?
Most Open Source projects will have a gitter, discord or slack channel for questions. Go to the chat and ask your questions and someone will unblock you. You can usually find the url to these in the projects README.
If this is not the case, find someone active on the repo you see commenting on issues and Pull/Merge Requests and message them directly, I’m sure they’ll be happy to help.
Hope you learned something!