Worktrees

suggest change

Syntax

Parameters

Parameter Details
-f, --force By default, add refuses to create a new working tree when <branch> is already checked out elsewhere. This option overrides that safeguard.
-b <new-branch>, -B <new-branch> With add, create <new-branch> starting at <branch> and check it out in the new working tree. If <branch> is omitted, it defaults to HEAD. -b refuses to create a branch that already exists. -B resets <new-branch> to <branch>.
--detach With add, detach HEAD in the new working tree.
--[no-]checkout add checks out <branch> unless you pass --no-checkout, for example so you can set up sparse checkout first.
-n, --dry-run With prune, report what would be removed and remove nothing.
--porcelain With list, print a stable format for scripts.
-v, --verbose With prune, report every removal.
--expire <time> With prune, expire unused working trees older than <time>.

Remarks

See the official documentation for more information: https://git-scm.com/docs/git-worktree.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents