⚡ Advanced
How to use git worktree
Work on multiple branches simultaneously without stashing.
Add a worktree
git worktree add ../hotfix hotfix-branchCreates a new working directory at ../hotfix checked out to hotfix-branch.
When to use: Working on a hotfix while keeping your current feature branch intact — no stashing needed.
List worktrees
git worktree listShows all active worktrees and their branches.
Remove a worktree
git worktree remove ../hotfixRemoves the worktree directory and cleans up references.