What problem does it solve?
Setting up git worktrees for parallel branch development involves many error-prone details: path naming conventions, copying gitignored .env files, installing dependencies with the right package manager, and safe cleanup. This Skill provides a single command reference so agents and developers implement worktree workflows correctly without rediscovering these steps.
Core Features & Use Cases
- Path Naming Convention: Deterministic rules for deriving worktree directory names from branch names (lowercase, slashes converted to dashes), with collision checks against existing paths.
- Environment File Copying: rsync and git ls-files based recipes to copy only local secret .env files (never .env.example or .env.template) from the main checkout into the new worktree.
- Dependency Install and Cleanup: Lockfile-based package manager detection (pnpm, yarn, npm, bun) plus safe removal with git worktree remove and prune.
- Use Case: When working on a feature branch like nv-1234/foo-bar, use this reference to create a sibling worktree at ../nv-1234-foo-bar, copy the Novu app's .env files from the parent checkout, run pnpm install, and later remove the worktree cleanly.
Quick Start
Ask the agent to create a git worktree for a new branch following the nv-worktree-commands reference, including copying local env files and installing dependencies.