Git Worktree Command Generator
Build git worktree add, list, move, remove, lock, and prune command sequences with branch flags and safe shell quoting.
Worktree Configuration
Generated Shell Sequence
About This Tool
Generates ready-to-run git worktree commands so you can check out multiple branches simultaneously in sibling directories without stashing or cloning the repository twice.
Supports new branch creation (-b / -B), remote tracking (--track), detached HEAD inspection (--detach), worktree locking (--lock --reason), relocation (move), cleanup (remove / prune), and safe POSIX shell quoting.
Key Features
- All 7 git worktree subcommands: Switch between add, list, move, remove, lock, unlock, and prune with context-aware flags.
- Branch creation & start-point support: Check out an existing branch, create a new branch (-b) from origin/main, reset a branch (-B), or inspect a tag in --detach mode.
- Post-checkout shell sequence: Optionally append cd and editor launch commands (VS Code, Cursor, Zed) so you can paste one snippet into your terminal.
- POSIX shell escaping: Automatically quotes paths, branch names, and lock reasons containing spaces or apostrophes.