🔹Report Bug   🔹Request Feature
Install gh extension install HikaruEgashira/gh-wt
# List worktrees in current repository
gh wt list
# Create a new worktree for feature branch
gh wt add feature-branch
# Remove a worktree (interactive selection)
gh wt remove
# Open a worktree in VS Code (path as argument)
gh wt code
# Run commands in the selected worktree directory
gh wt -- claude
gh wt -- git status
gh wt -- npm test$ gh wt --help
Usage:
gh wt list ... List git worktrees in current repository
gh wt add <branch> [path] ... Add a new worktree in current repository
gh wt remove ... Remove a worktree in current repository
gh wt -- <command> ... Search via fzf and run <command> in the selected worktree
gh wt <command> ... Search via fzf and run <command> with selected worktree as argumentPasses the worktree path as an argument to the command
gh wt code # Opens VS Code with the selected directoryChanges to the worktree directory and executes the command
gh wt -- claude # Run Claude Code in the selected directory
gh wt -- # Opens a shell in the selected directoryWhen creating a worktree, dependencies are automatically linked to the parent repository
| Source | Shared Directory |
|---|---|
| Node.js | node_modules |
| Python | .venv |
| Rust | target |
| Go | vendor |
| Ruby | vendor/bundle |
| Swift | .build |
| Zig | zig-cache, .zig-cache |
| Deno | deno_dir |
| .gitignore | Any directory listed in .gitignore |
gh-q: Quick repository navigation
gh q # Select repository
gh q -- # Change directory
gh wt add feature/new # Create new worktree
gh wt -- codex # Open worktree in Codex