Using Git Worktrees ensures work happens in an isolated workspace. It first checks whether you are already in a linked worktree, guarding against submodules, then asks for consent, then prefers a native worktree tool and falls back to git worktree add. It verifies the directory is ignored, installs dependencies and runs the tests for a clean baseline.
What You Get
- Detection of linked worktrees and submodules by comparing git directories
- A directory choice order: your instruction, an existing .worktrees or worktrees folder, then .worktrees
- A check that the worktree folder is git-ignored, with a .gitignore commit if it is not
- Automatic dependency setup for Node, Rust, Python and Go projects
- A baseline test run and a short ready report
Common Use Cases
- Starting a feature without touching your current branch
- Preparing a clean workspace before executing an implementation plan
- Working in place when a sandbox blocks worktree creation
What Makes It Unique
It puts the harness first: a native tool such as EnterWorktree handles placement and cleanup, and raw git worktree add is the fallback. It also treats consent, submodule false positives and unignored directories as explicit steps.
Under The Hood
Instructions with shell snippets. The agent runs git rev-parse, check-ignore, branch and worktree add, may edit .gitignore and commit it, runs a dependency install such as npm install, cargo build, pip install, poetry install or go mod download depending on the project files, and then runs the test suite. Installs reach package registries.