Skip to content

Add comprehensive git worktree workflow support #44

@spbolton

Description

@spbolton

Description

Summary

Add comprehensive git worktree workflow support to enable parallel development on multiple issues/branches simultaneously. This includes migration tools, unified command abstractions, and extensive documentation.

Implemented Features

Core Scripts

  • git-migrate-to-worktrees: Convert existing repos to worktree structure
  • git-issue-branch: Unified command that adapts to both traditional and worktree repos
  • git-smart-switch: Context-aware branch switching/navigation
  • git-worktree-ide: IDE launcher for worktree directories
  • git-worktree-cleanup: Automated cleanup of merged worktrees
  • git-clone-worktree: Clone repos with worktree structure from start

Intelligent Abstractions

  • Auto-detection of repository structure (traditional vs worktree)
  • Transparent delegation from git-issue-branch to worktree-specific implementations
  • Behavioral polymorphism: same commands, adaptive behavior
  • Graceful fallback for legacy worktree patterns

Documentation

  • WORKTREE_WORKFLOW.md: Comprehensive workflow guide with critical rules
  • WORKTREE_QUICK_START.md: Quick reference for getting started
  • WORKTREE_SCRIPT_ABSTRACTIONS.md: Technical architecture documentation

Benefits

  • No more branch switching - each branch gets its own directory
  • Parallel development - work on multiple issues simultaneously
  • AI agent friendly - perfect for multiple AI coding sessions
  • Zero learning curve - same commands work everywhere
  • IDE friendly - open multiple IDE windows, each on different branch

Key Design Principles

  1. Same commands everywhere: git issue-branch adapts to repo structure
  2. Optional conveniences: Native git commands still work
  3. Safety by default: Prevents common mistakes and conflicts
  4. Progressive enhancement: Works with and without migration

Target Structure

After migration:

  • Base directory: metadata only (.git/, worktrees/)
  • Working directories: worktrees/issue-123-feature/, worktrees/main/
  • Each worktree stays on its matching branch

Acceptance Criteria

  • [Define what needs to be accomplished]

Additional Notes

[Any additional context or notes]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions