Photo by Glenn Carstens-Peters on Unsplash
A Step-by-Step Guide to Contributing to Open-Source Projects
If you've been on GitHub for somewhile, you might've observed several open-source repos you can add to.
Not only do you get to improve and fine-tune your coding skills as a dev, you also get to improve your chances of growing your professional network and connecting with new like-minded people like yourself. If you've never even held a real job at that point, contributing to open-source projects will convey an idea of what it feels like to work in a real job.
So, how do you start out?
Fortunately, the steps are straightforward. As you might expect, you'd have to sign-in to your GitHub. Search for dev topics you vibe with. After picking a suitable repo, decide on issue and get to work.
Here's a guide to consider sticking with:
1. Fork the Repo
Tap on the Fork button. I've highlighted it in a blue box in the image below. This creates a local copy of the repo in your account.
2. Clone the repository
Head over to the repo from your account. Tap on "Code". Copy the URL. Open your CLI. To do this, simply head over to your PowerShell on a Windows machine. Then clone the repo. That would be by typing:
git clone copied_url
3. Create a Branch
Change the directory in your local terminal to the repo you recently cloned. Create a new branch from the open issues you've picked on.
I recommend sticking with a new name the same as you found previously.
If you're not sure what the branch name is, tap on the "Create a Branch" bar upon opening your preferred issue's dedicated page.
Copy the branch name if you want.
In your terminal, type out:
git branch -b branch-name
Use git status
to affirm you're on the right branch.
4. Code In your Changes
Code in the changes to the outstanding issues. Commit the modifications you've made with the commands below:
git add .
git commit -m “your message to whomever here”
5. Push Changes to GitHub
Push the adjustments you've made to GitHub with the snippet below:
git push -u origin branch-name