I recently got my first PR on Facebook/Lexical approved and merged, I got a lot of questions on how I went about it. So I decided to write a blog post about it.
When it comes to contributing to open source software, knowing how to utilize Git is essential. There are a few things you need to look out for when planning to make your first OSS contribution.
- Before you clone, read the ReadMe and contribution.md files. These files are included with most open source projects, and they're a fantastic way to figure out how you'll go about contributing to the project.
- When browsing through the project issues on Github, keep an eye out for good first issues and documentation badges. Any of these options are a great and straightforward way to get started contributing to OSS and get your first pull request.
- I recommend that you attempt reproducing the bug to properly comprehend the fix you'll be making, especially if there's a guide on how to do so.
- Before you add and commit much after you've fixed the bug, checkout to a new branch. The branch name should preferably be the same as the name of the fix you performed. Also, commit messages should be precise and informative.
git checkout -b "my-new-branch-name"
git commit -a -m "description of the changes"
- Finally, include a summary of the changes you made in your pull request, as well as a link to the bug issue you fixed.
Happy Contributing ๐
ย