Skip to content

Implement missing worktree management commands #3

@tobiase

Description

@tobiase

Overview

Add the remaining worktree management commands. The wt recent command has already been implemented.

Missing commands to implement

wt status

Show status summary across all worktrees:

$ wt status
main         ✓ clean
feature-1    ⚡ 2 files modified, 1 untracked
feature-2    ↑ 3 commits ahead of origin
bugfix       ✗ merge conflict

wt clean

Remove stale/merged worktrees:

$ wt clean
Found 2 worktrees with merged branches:
- feature-1 (merged to main)
- bugfix-123 (merged to main)

Remove these worktrees? [y/N]

wt sync

Pull latest changes in all worktrees:

$ wt sync
Updating worktrees...
✓ main: Already up to date
✓ feature-1: Fast-forwarded
✗ feature-2: Has local changes

Implementation notes

  • Track access times in config
  • Handle git operations safely
  • Provide dry-run options
  • Clear status indicators

Status

  • wt recent - Already implemented with full feature set
  • wt status - Not implemented
  • wt clean - Not implemented
  • wt sync - Not implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions