Expand description
§Worktree CLI
A powerful CLI tool for managing git worktrees with enhanced features including centralized storage, automatic config file synchronization, and intelligent branch management.
§Features
- Centralized Storage - Organizes worktrees in
~/.worktrees/<repo-name>/<branch-name>/ - Smart Config Management - Automatically copies gitignored config files to new worktrees
- Branch Synchronization - Keeps worktrees and git branches in sync
- Comprehensive Status - Shows detailed worktree and branch status
- Configurable Patterns - Customize which files to copy via
.worktree-config.toml - Safe Branch Names - Automatically sanitizes branch names with slashes and special characters
§Quick Start
# Create a new worktree for feature development
worktree create feature/auth
# Create a worktree with a new branch
worktree create -b new-feature
# List all worktrees
worktree list
# Remove a worktree
worktree remove feature/auth§Module Structure
commands- Individual command implementations (create, list, remove, status, etc.)storage- Manages worktree storage in~/.worktrees/with branch name sanitizationconfig- Handles.worktree-config.tomlfiles for customizing file copy patternsgit- Git operations wrapper using git2 crateselection- Abstracts interactive selection prompts for testabilitytraits- Defines GitOperations trait for testability and abstraction
Modules§
Type Aliases§
- Result
Result<T, Error>