Commands

Commands

Complete reference for all wt commands and options.

Basic Usage

wtInteractive menu

Opens the main interactive menu with all worktrees and actions.

wt <name>Quick switch

Fuzzy-match and jump directly to a worktree.

bash
wt feat    # Matches "feature-auth", "feat-login", etc.
wt review  # Matches "reviewing-fix-bug"
wt -Previous worktree

Switch to the previous worktree (like cd -).

wt .Main worktree

Switch to the main (primary) worktree.

Options

OptionDescription
--help, -hShow help message
--version, -vShow version number
--setupRun the setup wizard (shell config, dependency check)
--devSwitch to dev mode (use wt.sh from current worktree)
--releaseSwitch back to release mode (use wt-core from PATH)
--wizardRun the preferences wizard (editor, platform, settings)

Main Menu

Running wt displays the interactive main menu:


  Git Worktree Manager v1.8.0

+-------------------------------------------------------------------------+
| myapp | ^E: editor | ^N: new | ^P: PRs | ^G: issues | ^D: delete        |
+-------------------------------------------------------------------------+
| > ~/projects/myapp                                          [main]      |
|   ~/projects/myapp-feature-auth                          *  [feature]   |
|   ~/projects/myapp-reviewing-fix-bug                        [fix/bug]   |
| -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-     |
|   Create a worktree                                                     |
|   Manage stashes                                                        |
|   Delete worktree(s)                                                    |
|   ⚙ Settings                                                            |
|   Quit                                                                  |
+-------------------------------------------------------------------------+

The * indicator shows worktrees with uncommitted changes.

Creating Worktrees

Access the creation menu via Ctrl+N or select "Create a worktree" from the main menu.

OptionDescription
New branchEnter a name and select base branch
From existing branchBrowse all local and remote branches
From current (quick copy)Creates a copy of the current branch with timestamp
From an issueCreates feature/{issue-num}-{title} branch
Review a PRCreates worktree with reviewing- prefix

Worktree Placement

Worktrees are always created next to your main repository:

bash
~/projects/
  myapp/                           # Main repo
  myapp-feature-auth/              # From branch
  myapp-feature-7-add-dark-mode/   # From issue
  myapp-reviewing-fix-bug/         # From PR
  myapp-main-copy-20250116/        # From current

Stash Management

Access "Manage stashes" from the main menu for a complete stash management experience with a completely redesigned interface.

Stash List View

Each stash displays: age, file count, origin branch, and message. Select any stash to see detailed info including modified files and diff stats.

ShortcutAction
Ctrl+AApply stash (keep it in the list)
Ctrl+PPop stash (apply + remove)
Ctrl+DDrop stash(es) - supports multi-select
Ctrl+NNew stash (all changes)
Ctrl+EPartial stash (select specific files)
Ctrl+WCreate worktree from stash
Ctrl+BCreate branch from stash
Ctrl+SView full diff in pager
Ctrl+XExport stash as .patch file
Ctrl+RApply + resolve conflicts (Claude)

Advanced Features

  • *Partial stash — select specific files to stash, leave others untouched
  • *Worktree from stash — create a new worktree with the stash auto-applied
  • *Claude conflict resolution — let AI resolve merge conflicts when applying stashes
  • *Rename stash — change the stash message (via actions menu)

Deleting Worktrees

Access delete mode via Ctrl+D or select "Delete worktree(s)" from the main menu.

  • *Use Space to toggle selection for multi-delete
  • *Press Enter to confirm deletion
  • *Extra confirmation is shown for worktrees with uncommitted changes

Editor Detection

Ctrl+E opens a worktree in your editor. The editor is resolved in this order:

  1. WT_EDITOR config value (set via ⚙ Settings)
  2. Cursor
  3. VS Code
  4. $EDITOR environment variable
  5. vim (fallback)