Development
Step1: Create Branch
git checkout -b B_NAME
Step2: Write Code
Step3: Commit
git add .
git commit
Step4: Push
git push origin B_NAME
If there is no new commit in the main, jump to step8.
Step5: Fetch Remote Code
git checkout main
git pull origin main
Step6: Merge Remote -> Local
git checkout B_NAME
git rebase main
Important: Using rebase will be better here to make it clear what you have modified.
Step7: Push (Override Step 4)
git push -f origin B_NAME
Step8: Create a PR on GitHub.
Important: Please use squash and merge
to make the commits to be a single one.
Notes:
- You can use PR to merge by yourself on GitHub.
- Make sure the code works well before merging.
- Please create a new branch to hotfix on the main rather than directly commit to main branch.