| # Development | |
| ## Step1: Create Branch | |
| ```commandline | |
| git checkout -b B_NAME | |
| ``` | |
| ## Step2: Write Code | |
| ## Step3: Commit | |
| ```commandline | |
| git add . | |
| git commit | |
| ``` | |
| ## Step4: Push | |
| ```commandline | |
| git push origin B_NAME | |
| ``` | |
| If there is no new commit in the main, jump to step8. | |
| ## Step5: Fetch Remote Code | |
| ```commandline | |
| git checkout main | |
| git pull origin main | |
| ``` | |
| ## Step6: Merge Remote -> Local | |
| ```commandline | |
| 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) | |
| ```commandline | |
| 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. | |