Skip to content

Commit 966b863

Browse files
committed
docs(cli): explain detached worktree targeting
1 parent 2f4a4be commit 966b863

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/cli.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ branch when no `--branch` is passed (`worktree.auto_branch`), so two checkouts n
9494
same hostnames. A one-line notice is printed to stderr when the default kicks in, so captured
9595
stdout stays clean.
9696

97+
A detached linked worktree has no branch name to derive, so these commands fail instead of silently
98+
targeting the base instance. Pass `--branch <name>` to select an isolated instance, or set
99+
`worktree.auto_branch` to `false` only when intentionally opting into the base instance.
100+
97101
Opt out:
98102

99103
- pass `--branch <name>` explicitly (always wins), or

0 commit comments

Comments
 (0)