docs(workflow): require rebase-first + rebase-and-merge policy

This commit is contained in:
zap
2026-03-04 23:15:37 +00:00
parent d927e5233d
commit b36ab89624
2 changed files with 17 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ Use this whenever modifying OpenClaw itself.
cd external/openclaw-upstream
git fetch --all --prune
git checkout main
git pull --ff-only
git pull --rebase
git checkout -b fix/<short-topic>
```
@@ -21,7 +21,14 @@ Then:
1. Implement in `src/` (and docs/tests as needed).
2. Run targeted tests first; run broader suite if change touches shared paths.
3. Commit with Conventional Commit format.
4. Push branch and open PR.
4. Rebase onto latest `main` before push/PR:
- `git fetch origin && git rebase origin/main`
5. Push branch and open PR.
## Merge policy
- Preferred PR strategy: **Rebase and merge**
- Avoid merge commits unless explicitly required for a special case
## Branch naming
@@ -42,7 +49,7 @@ scripts/openclaw-update-safe.sh
- After runtime update, re-sync upstream clone before new changes:
```bash
cd external/openclaw-upstream && git fetch --all --prune && git checkout main && git pull --ff-only
cd external/openclaw-upstream && git fetch --all --prune && git checkout main && git pull --rebase
```
## Emergency dist hotfix policy