What problem does it solve?
This Skill automates the creation of isolated Git worktrees, ensuring a clean and safe development environment for new features or tasks, preventing accidental commits to the main codebase.
Core Features & Use Cases
- Isolated Workspaces: Creates separate directories for working on different branches without disrupting your main working copy.
- Smart Directory Selection: Prioritizes preferred locations (
.worktrees/, worktrees/) or global configurations, asking the user when necessary.
- Safety Verification: Automatically checks if project-local directories are ignored by Git before creating a worktree to prevent accidental tracking.
- Automated Setup: Detects and runs project-specific setup commands (e.g.,
npm install, cargo build).
- Baseline Testing: Verifies the new worktree starts from a clean state by running project tests.
- Use Case: Before starting a new feature like "user authentication," you can use this skill to create a dedicated, isolated worktree for it, ensuring your main branch remains stable and clean.
Quick Start
Use the using-git-worktrees skill to set up an isolated workspace for the 'feature/new-login' branch.