branch-discipline
Branch Discipline — Never Fake “Back to Main” With a Detach
Section titled “Branch Discipline — Never Fake “Back to Main” With a Detach”NEVER git checkout origin/main / git switch --detach to return to main: it detaches HEAD in the main clone. After a PR merges: git switch main && git pull --ff-only (in a linked worktree, its OWN branch), delete the merged branch, confirm git status --short is empty, report “back on main, working tree clean.” Start fresh work with git switch -c <branch> origin/main.
Worktree exception: a +-prefixed branch is checked out elsewhere: leave it, never delete or PR from it (“in worktree, left untouched”). Pinned lane: stays until the user asks for cleanup; a merged one is reaped (worktree-session-pinning.md).
Procedure: skills/t1k-git/references/branch-discipline.md. Worked example: docs/branch-discipline.md.