How to Work with Multiple Branches Using Git Worktree
Use git worktree to work on multiple branches simultaneously.
Updated Jul 6, 2026Intermediate1 min read
Share
What is worktree
Git worktree allows you to work on multiple branches of the same repository at the same time.
Create a new worktree
bash
git worktree add ../project-feature feature-branch
cd ../project-featureWork in the worktree
bash
# Modify code in the current worktree
git add .
git commit -m "feat: new feature"
git push origin feature-branchRemove a worktree
bash
cd ..
git worktree remove ../project-featureList worktrees
bash
git worktree list