General
What is GWTree?
What is GWTree?
What are git worktrees?
What are git worktrees?
How is GWTree different from git worktree?
How is GWTree different from git worktree?
- Smart defaults: Automatically handles branch creation, naming, and directory structure
- Interactive prompts: Guides you through worktree creation
- Batch creation: Create multiple worktrees with one command
- Status dashboard: See all worktrees’ status at a glance
- Smart cleanup: Auto-remove merged worktrees
- Merge helper: One command to merge, cleanup, and delete branches
- Editor integration: Automatically opens worktrees in VS Code or Cursor
- Dependency handling: Auto-installs dependencies in new worktrees
Why use GWTree for AI coding agents?
Why use GWTree for AI coding agents?
- No conflicts: Each agent works on its own branch
- Parallel execution: Run multiple agents simultaneously
- Clean merges: Merge each feature independently when ready
- Instant setup:
gwt a b c -xcreates 3 worktrees in seconds
Installation & Setup
How do I install GWTree?
How do I install GWTree?
What are the system requirements?
What are the system requirements?
- Node.js: 18.0.0 or higher
- Git: Any recent version
- Operating System: Linux, macOS, Windows
- VS Code or Cursor (for editor integration)
- pnpm/yarn/bun (for dependency management)
Where are config files stored?
Where are config files stored?
- Config:
~/.config/gwtree/config.json - Worktree registry:
~/.gwtree/worktrees.json
Usage
How do I create a worktree?
How do I create a worktree?
How do I use different names for worktree and branch?
How do I use different names for worktree and branch?
- Run
gwt - Press ESC at the name prompt
- Enter worktree name:
login-feature - Enter branch name:
feature/user-authentication
repo-login-feature/ directory with feature/user-authentication branch.How do I list all worktrees?
How do I list all worktrees?
How do I check worktree status?
How do I check worktree status?
- Uncommitted changes
- Commits ahead/behind main
- Merge status
- Added/deleted lines
How do I remove worktrees?
How do I remove worktrees?
How do I merge a worktree?
How do I merge a worktree?
merge command automates the entire merge workflow:- Switches to main branch
- Merges the feature branch
- Removes the worktree
- Deletes the feature branch
Configuration
How do I configure the default editor?
How do I configure the default editor?
editor to one of:"code"- VS Code (default)"cursor"- Cursor"default"- System default editor ($EDITOR)"none"- Don’t open editor
How do I disable automatic dependency installation?
How do I disable automatic dependency installation?
installDeps to false:How does GWTree detect package managers?
How does GWTree detect package managers?
pnpm-lock.yaml→ pnpmbun.lockb→ bunyarn.lock→ yarnpackage-lock.json→ npmpackage.json(no lock file) → pnpm
lastPm config and used for future worktrees.Can I customize the worktree naming pattern?
Can I customize the worktree naming pattern?
{repo}-{name}. For example:- Repository:
my-app - Name:
feature-login - Worktree directory:
my-app-feature-login
Workflow
What's the recommended workflow for multiple AI agents?
What's the recommended workflow for multiple AI agents?
- Claude Code →
repo-auth/ - Command Code →
repo-api/ - Cursor →
repo-dashboard/
How do I handle uncommitted changes?
How do I handle uncommitted changes?
- Stash changes: Saves changes with
git stash(recommended) - Ignore and continue: Leaves changes in current worktree
- Cancel: Aborts worktree creation
Do I need to be on the main branch?
Do I need to be on the main branch?
- If you’re not on main/master, it prompts to switch
- In fast mode (
-y), it switches automatically - Worktrees are always created from the main branch
What happens to dependencies?
What happens to dependencies?
installDeps is enabled (default), GWTree:- Detects package manager in the new worktree
- Runs install command (
pnpm install,npm install, etc.) - Shows install status in the output
Can I use worktrees without GWTree?
Can I use worktrees without GWTree?
Troubleshooting
What if I manually delete a worktree directory?
What if I manually delete a worktree directory?
Why isn't my worktree showing in gwt ls?
Why isn't my worktree showing in gwt ls?
gwt ls shows only worktrees created by GWTree. It reads from ~/.gwtree/worktrees.json.To see all worktrees (including manually created ones):How do I recover stashed changes?
How do I recover stashed changes?
- Navigate to the original worktree (usually main repo)
- Apply the stash: