Git Advanced Cheat Sheet/Create an additional worktree for a branch

Check out another branch in a separate directory without cloning again.

Section: Advanced Working Tree Management

Create an additional worktree for a branch

bash
bash
git worktree add ../feature feature-branch
Explanation

Worktrees are excellent for parallel branch work, hotfixes, and avoiding branch switching in a single working directory.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Advanced Working Tree Management
Stash including untracked files
Save tracked and untracked work temporarily.
OpenIn sheetbashsame section
Preview removal of untracked files and directories
Dry-run a repository cleanup before deleting anything.
OpenIn sheetbashsame section
Check rerere status
Inspect recorded conflict-resolution reuse state.
OpenIn sheetbashsame section
Interactive rebase last 5 commits
Open the last 5 commits in the interactive rebase todo list.
OpenIn sheetbash1 tag match
Show reflog with local timestamps
Inspect branch and HEAD movements with readable times.
OpenIn sheetbash1 tag match
Cherry-pick a range without committing
Apply commit changes into the index and working tree first.
OpenIn sheetbash1 tag match