File size: 939 Bytes
032e687 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# 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.
|