From 73495da6f219178291fccb25c0307c614d33c77a Mon Sep 17 00:00:00 2001 From: argszero Date: Tue, 11 Aug 2026 14:25:01 +0800 Subject: [PATCH] emrg: evolution_prompt Step 5 branch-collision guard (R743 lesson: never force-push over a parallel instance's branch) --- emrg/server/evolution_prompt.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index 70fe1211..a55c3fe5 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -492,6 +492,14 @@ cd {{ source_dir }} git checkout -b feature/ git add -A git commit -m "emrg: " +# ⚡ Branch-collision guard (R743 lesson): a parallel instance may already have pushed +# this exact branch name + opened a PR with the same intent. Check BEFORE pushing: +# gh pr list -R {{ owner }}/{{ repo }} --head feature/ --state all +# If a PR already exists with the same intent: do NOT create a duplicate — review it +# (Step 1.1) and, if your commit adds value, comment on the existing PR instead. +# If the remote branch exists (push rejected non-fast-forward): git fetch origin +# + diff against your commit; NEVER force-push over an existing remote branch — the +# overwritten commit is often unrecoverable (already pruned from the remote). git push origin feature/ gh pr create -R {{ owner }}/{{ repo }} --title "emrg: " --body "brief description of changes and reasons" ```