GIT Worktree
Git worktree: different directory shared .git
https://git-scm.com/docs/git-worktree
Git worktrees let you have multiple working directories associated with a single repository, each potentially on different branches.
Basic Concepts
A git repository can have one main worktree (your original working directory) and multiple linked worktrees. Each worktree has its own working directory and can be on different branches, but they all share the same .git
directory and repository history.
Important Notes
- All worktrees share the same repository history, so commits made in any worktree are visible in all others
- Configuration and hooks are shared between worktrees
- You can't delete a worktree that has uncommitted changes
- Submodules are shared.
References
For Searchability
For Searchability
A way to parallize claude/code agents in the same repo.
GIT Workspaces