How It Works
Git worktrees let you check out multiple branches from the same repository into separate directories. Each worktree has its own working copy of the files while sharing the same Git history and remotes. Mains uses this to isolate parallel sessions completely.- Each session gets its own working directory — no shared file state
- Changes in one worktree don’t affect others
- All worktrees share Git history and remote connections
- Sessions can run different branches simultaneously
