Stop the dev-work merge step from camping on main #307
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!307
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/dev-work-merge-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
#304 fixed the post-merge instruction — update
mainas a ref rather than switching a worktree to it. But it left step 3 as "Merge using the repo's normal merge path," which specifies nothing. Agents fill that gap withgh pr merge --squash --delete-branch, and that flag re-creates the exact camping the rest of the doc is trying to prevent.Observed on #305: the merge succeeded, then
ghsilently switched the feature worktree ontomain.The mechanism
Both halves of
-dare wrong for this repo:delete_branch_on_merge=trueon the repo (verified viagh api), so GitHub deletes the branch beforeghasks. The merged branch was already gone.HEADis on, soghchecks out the default branch and pulls it first. That checkout is the defect, and on success it is silent.Worth noting because it inverts the previous understanding: freeing
main— the #304 fix — does not prevent this. It only converts the loudfatal: 'main' is already used by worktreeinto a quiet checkout. Not passing the flag is the actual fix.Changes
gh pr merge <n> --squash), forbid-d, give both reasons.git fetch origin main:mainupdatesmaineverywhere. There is no separate "get main up to date at the git root" task.git checkout --detach main && git branch -D <branch>, which detaches first so nothing camps and lands the worktree on the merged result.--delete-branchnote, which described only the loud failure mode.Validation
Docs-only; no build or runtime impact. This PR is being merged with the procedure it documents, which also confirms that a no-
-dmerge performs no local git operations.