worktree-ops
Installation
SKILL.md
Worktree Management
Git worktrees let you check out multiple branches of the same repository into separate directories simultaneously. Each worktree has its own working directory and index while sharing the same .git object store and history. This is useful for running parallel development sessions, reviewing a PR while mid-feature, or isolating experimental changes without stashing or committing half-finished work.
Core Principles
| Principle | Meaning |
|---|---|
| Isolation without duplication | Worktrees share git history but keep working directories separate - no need to clone the repo again |
| Safety first | Always check for uncommitted changes and unpushed commits before removing a worktree |
| Clean up after yourself | Stale worktree entries and orphaned branches accumulate - prune regularly |
| Convention over configuration | Use a consistent directory layout (.worktrees/<name>/) and branch naming (worktree-<name>) |