docs(workflow): require branch deletion after rebase-merge
This commit is contained in:
@@ -148,6 +148,7 @@ Skills provide your tools. When you need one, check its `SKILL.md`. Keep local n
|
|||||||
- PR merge strategy for OpenClaw upstream:
|
- PR merge strategy for OpenClaw upstream:
|
||||||
- prefer **Rebase and merge**
|
- prefer **Rebase and merge**
|
||||||
- avoid merge commits unless explicitly needed for special cases
|
- avoid merge commits unless explicitly needed for special cases
|
||||||
|
- after merge, delete the working branch both remotely and locally (feature/fix branches are temporary)
|
||||||
- If an emergency local dist hotfix is unavoidable, also:
|
- If an emergency local dist hotfix is unavoidable, also:
|
||||||
- capture an idempotent patch script in `scripts/`
|
- capture an idempotent patch script in `scripts/`
|
||||||
- document rollback/update behavior
|
- document rollback/update behavior
|
||||||
|
|||||||
@@ -30,6 +30,31 @@ Then:
|
|||||||
- Preferred PR strategy: **Rebase and merge**
|
- Preferred PR strategy: **Rebase and merge**
|
||||||
- Avoid merge commits unless explicitly required for a special case
|
- Avoid merge commits unless explicitly required for a special case
|
||||||
|
|
||||||
|
## Post-merge branch cleanup (required)
|
||||||
|
|
||||||
|
After PR merge, delete the branch on both remote and local:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# from repo root
|
||||||
|
|
||||||
|
git checkout main
|
||||||
|
git pull --rebase
|
||||||
|
|
||||||
|
# delete remote branch
|
||||||
|
|
||||||
|
git push origin --delete <branch-name>
|
||||||
|
|
||||||
|
# delete local branch
|
||||||
|
|
||||||
|
git branch -d <branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
If branch was not merged cleanly and Git blocks deletion, inspect first; only then force-delete local branch with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git branch -D <branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
## Branch naming
|
## Branch naming
|
||||||
|
|
||||||
- `fix/...` for bugfixes
|
- `fix/...` for bugfixes
|
||||||
|
|||||||
Reference in New Issue
Block a user