Command

git worktree remove

Remove a linked checkout after preserving files and verifying the path; ordinary branch refs remain.

Formal Syntax & Structure

git syntaxgit
git worktree remove PATH
Git Reference