Skip to content

The queue command analyzes all completed worktrees and shows the optimal merge order based on commit count and file overlap. Optionally ships them all in sequence.

Usage

bash
owt queue [OPTIONS]

Options

OptionDescription
--base <branch>Target base branch for merges
--shipShip all completed worktrees in optimal order
-y, --yesSkip confirmation prompts

How It Works

owt queue inspects all worktrees with WAITING or COMPLETED status and ranks them by merge complexity using the MergeManager:

  1. Commit count -- fewer commits merge first (less risk)
  2. File overlap -- worktrees touching unique files merge before those with shared files

Worktrees with no file overlap and the fewest commits are placed at the front of the queue, so the lowest-risk merges land first.

Examples

View Merge Order

bash
owt queue

Output:

         Merge Queue
┌───┬──────────────┬─────────┬─────────┐
│ # │ Worktree     │ Commits │ Overlap │
├───┼──────────────┼─────────┼─────────┤
│ 1 │ fix-typos    │ 2       │ 0 files │
│ 2 │ add-docs     │ 5       │ 0 files │
│ 3 │ auth-jwt     │ 12      │ 3 files │
└───┴──────────────┴─────────┴─────────┘

Ship All Completed Work

bash
owt queue --ship

Ships each worktree in order: commit, merge, teardown, then move to the next.

Ship Without Confirmation

bash
owt queue --ship --yes

When to Use

ScenarioCommand
See what's ready to landowt queue
Ship everything in one goowt queue --ship
CI/CD automated mergeowt queue --ship --yes
Ship a single worktreeowt ship

See Also