diff --git a/AGENTS.md b/AGENTS.md index ca99410..d8acb88 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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: - prefer **Rebase and merge** - 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: - capture an idempotent patch script in `scripts/` - document rollback/update behavior diff --git a/scripts/openclaw-upstream-workflow.md b/scripts/openclaw-upstream-workflow.md index 402567d..ba5f75f 100644 --- a/scripts/openclaw-upstream-workflow.md +++ b/scripts/openclaw-upstream-workflow.md @@ -30,6 +30,31 @@ Then: - Preferred PR strategy: **Rebase and merge** - 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 + +# delete local branch + +git branch -d +``` + +If branch was not merged cleanly and Git blocks deletion, inspect first; only then force-delete local branch with: + +```bash +git branch -D +``` + ## Branch naming - `fix/...` for bugfixes