Submitting PRs to GitHub Open Source Projects
Working on your own projects on GitHub is relatively simple, but how to collaborate and contribute to open source projects is more interesting. Here I’m documenting the experience I’ve accumulated contributing to open source projects like inshellisense.

Using the inshellisense project as an example
Fork the open source project,
microsoft/inshellisense=>alanhg/inshellisenseCreate a new branch, such as
fix/file-template, for development- Update unit tests if available, ensure tests pass
- Don’t use the main branch directly because the main branch is used to sync project updates, avoiding situations where the original project gets new commits during development
- Creating a new branch also allows better use of branch names to indicate whether the changes are features, fixes, etc.
Commit to the upstream repository
alanhg/inshellisenseIf the open source project
microsoft/inshellisensehas updates, pull the updates usingSync forkRebase the
fix/file-templatebranch with the main branch to ensure it’s up to datePush again to the upstream repository
alanhg/inshellisenseInitiate a
Pull Request, describe the changes in detail, and wait for merging- If there are any issues during PR review, provide active feedback and resolve them
Once successfully merged, celebrate 🎉
You can delete the
fix/file-templatebranch, switch to the main branch, and if there are new contributions to make, repeat step 5 for operation

