It’s relatively simple to manage projects on GitHub by oneself, but collaborating and contributing to open source projects is quite interesting. Here, I’llc write my experience in contributing to open source projects, such as inshellisense.
Taking the project inshellisense as an example:
Fork the open source project,
microsoft/inshellisense
=>alanhg/inshellisense
Create a new branch, such as
fix/file-template
, and start development- If there are UTs, update them to ensure the tests pass.
- Here, we do not use the main branch directly because the main branch is used to synchronize project updates to avoid new commits in the original project during development.
- At the same time, creating a new branch can also better utilize the branch name to indicate whether the changes are a feature or a fix, etc.
Push to the upstream, i.e.,
alanhg/inshellisense
If the open source project
microsoft/inshellisense
has updates, pull the updates withSync fork
Rebase the branch
fix/file-template
with the main branch to ensure it is up to datePush again to the upstream
alanhg/inshellisense
Initiate a
Pull Request
, describe the changes in detail, and wait for it to be merged- If there are any issues during PR review, actively provide feedback and resolve them
Celebrate 🎉 upon successful merge
You can delete the branch
fix/file-template
, switch to the main branch, and if you have more contributions to make, repeat the process from step 5