Contributing to an Open Source Project - journal
Having been away from coding for almost 2 years, it feels good to be able to slowly come back to it and refresh what I have learned. It is a slow progress but one of the things I would like to do more this year is Open Source contribution.
I would like to one day make a PR for an issue that requires me to submit my code but any contribution, however small, allows me to refresh and relearn the process of using Github and git.
I came across Bekah's Postpartum Wellness App through her journey on Twitter as I have been following her for awhile and Virtual Coffee. As a new mum to my soon-to-be 12-month-old baby boy, this hits close to home as I suffered from Postpartum Anxiety. I think her passion project can be useful to a lot of mums.
So I reached out to her to ask about how I can contribute. I have very little knowledge about React Native - I know it's a framework to build a mobile app using React. I know a bit of React and I always wanted to learn React Native. It's been on my to-learn list since last year when I had an idea about a mobile app that I wanted to build which I never really executed because a newborn baby was on the way.
Bekah was up to walk me through things so we are scheduling something for that. In the meantime, I wanted to take a look at the repo, read through the README and check out the issues. While reading the README.md file, I clicked on the contributing link but it redirected me to a 404 error page. So I thought, maybe this is something I can fix.
I have forgotten all the steps on what to do with git and Github! One thing I didn't want to do was mess the whole repo structure. So I did everything very cautiously.
📌 What I did:
- Fork the repo. What this does is it makes a copy of the repo to our own repo.
- Clone the repo in desired local folder.
git clone <repo link>
- Open the repo folder in Visual Studio Code.
- Checked out the files and made sure to install any dependencies => I realized Bekah uses Yarn in her project, which I have never installed and used so I installed Yarn.
To make changes to the README.md file, you want to work on a new branch rather than the master branch.
📌 So this is what I did:
- Create a new branch
git branch <name of new branch>
- Go to the new branch
git checkout <name of new branch>
- Make changes to the file.
- Add changes via
git add .
- Commit changes via
git commit -m <commit message of changes you made>
- Push changes via
git push origin <name of new branch>
- Open a Pull Request.
- Now we wait patiently for the OS maintaner to review it and give us feedback.
So that was my first pull request of the year! HURRAY 🎉
This whole process allowed me to refresh git and Github. Now onto understanding React Native 🙂
Here are some resources I found useful: