/manage-worktrees
Manages Git worktrees using gwq.
Quick Reference
| Command | Description |
|---|---|
| list | Show all worktrees |
| status | Show git status of all worktrees |
| remove | Remove a worktree |
| path | Show worktree directory path |
Prerequisite: gwq must be installed. See docs/prerequisites.md.
Progress Checklist
code
- [ ] Step 1: Parse command - [ ] Step 2: Execute command - [ ] Step 3: Report result
Steps
Command: list
Show all worktrees for the current repository.
bash
gwq list
Command: status
Show git status of all worktrees.
bash
gwq status
Command: remove
Remove a worktree.
- •
If no worktree specified, show list first:
bashgwq list
- •
Confirm with user before removal using AskUserQuestion.
- •
Remove the worktree:
bashgwq remove <worktree-name>
Use --force flag only if explicitly requested by user.
Command: path
Show the directory path of a worktree.
bash
gwq list
Parse output to find the worktree path matching the query, then display:
code
Worktree path: <path> To navigate in your terminal: cd <path>