CmdID

CmdID / Commands

git-worktree

Manage multiple working trees attached to the same repository. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Add a new worktree directory for a branch with the same name (created if missing)

git worktree add branchIdentify

Create a new directory with the specified branch checked out into it

git worktree add path/to/directory branchIdentify

Create a new directory with a new branch checked out into it

git worktree add path/to/directory -b new_branchIdentify

List all the working directories (including the primary one)

git worktree listIdentify

Move an existing worktree to a new location

git worktree move path/to/worktree new/pathIdentify

Remove a worktree directory and its metadata (only if it has no uncommitted changes)

git worktree remove path/to/worktreeIdentify

Remove metadata for a worktree directory that's been manually deleted

git worktree pruneIdentify