git worktree

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2026 Jan 1 22:52
Editor
Edited
Edited
2026 Jan 8 13:59
Refs
Refs

Use git worktree to run multiple branches without extra clones

git worktree add ../exp-new feature-branch

Why

It keeps experiments separate, avoids stash conflicts, and removes the need for repeated cloning when you switch between branches.

Cons

It just creates a folder like {folder}.worktrees, so git doesn't internally share resources. However, git hooks aren't shared, and neither are ignored important files and folders such as data/ or .env, which makes it less convenient for development.
 
 
 
 
 

Recommendations