diff --git a/Makefile b/Makefile index 6153a22..0b51158 100644 --- a/Makefile +++ b/Makefile @@ -200,6 +200,12 @@ worktree-rm: guard-name -git -C "$(WT_DIR)" submodule deinit -f user git worktree remove --force "$(WT_DIR)" git worktree prune + # The deinit above is required (a populated user/ blocks `worktree remove`), + # but worktrees SHARE .git/config — so it also strips submodule.user.url for + # the MAIN checkout, leaving `git submodule status` there showing `-` (not + # initialised) even though user/ is intact. Re-register it; init is + # idempotent and touches config only, never the working tree. + git submodule init @echo "Removed $(WT_DIR). If feat/$(NAME) is merged, drop it: git branch -d feat/$(NAME)" # ── Demo content ──────────────────────────────────────────────────────────────