From b38ad96a1f303167e0189027dfa9227e877e6083 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 00:12:00 +0000 Subject: [PATCH] land-and-deploy: host-neutral post-merge branch example (s06 M5) The squash-merge cleanup example created 'codex/post-merge-pr-N' branches on every host. The example is now 'post-merge/pr-N', naming Codex Desktop's codex/ prefix as the host-specific case and keeping the detached-HEAD reason and the no-force-push rule. No test pins the removed text. expected red until the regeneration commit --- land-and-deploy/sections/merge-and-deploy.md.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/land-and-deploy/sections/merge-and-deploy.md.tmpl b/land-and-deploy/sections/merge-and-deploy.md.tmpl index 6ef5f0fad7..61c29cbdb 100644 --- a/land-and-deploy/sections/merge-and-deploy.md.tmpl +++ b/land-and-deploy/sections/merge-and-deploy.md.tmpl @@ -116,7 +116,7 @@ Squash/rebase merge readback guard: git fetch "https://github.com/$REPO.git" "$BASE_BRANCH" git diff --quiet "$MERGE_SHA" FETCH_HEAD || git log --oneline --decorate -1 "$MERGE_SHA" FETCH_HEAD ``` -- If the worktree is clean and only needs to stop looking diverged after a squash merge, prefer a named local branch at the merge commit, for example `git switch -c "codex/post-merge-pr-$PR_NUMBER" "$MERGE_SHA"`. Avoid detached HEAD in Codex Desktop worktrees because git action workers often expect `git symbolic-ref --short HEAD` to return a branch. Do not force-push or reset a user's branch unless they explicitly ask. +- If the worktree is clean and only needs to stop looking diverged after a squash merge, prefer a named local branch at the merge commit over a detached HEAD, for example `git switch -c "post-merge/pr-$PR_NUMBER" "$MERGE_SHA"` (use the host's branch prefix where it has one, such as `codex/` in Codex Desktop, whose git action workers expect `git symbolic-ref --short HEAD` to return a branch). Do not force-push or reset a user's branch unless they explicitly ask. Worktree cleanup — non-destructive, candidate-based: ```bash