git-worktree

Coordinate parallel git worktrees with environment copying and port isolation.

15|5|Updated May 17, 2026
One-click install
npx skills add https://github.com/cropsgg/skills --skill git-worktree-cropsgg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/cropsgg/skills/tree/main/skills/engineering/git-worktree
Command: npx skills add https://github.com/cropsgg/skills --skill git-worktree-cropsgg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage parallel git worktrees for isolated feature development, code review, and hotfix workflows. This tool routes all git operations through a manager protocol that ensures .env copying, port isolation, and dependency drift detection, preventing cross-branch pollution and accidental commits to the wrong branch.

Core Features & Use Cases

  • Create isolated worktrees for feature branches, review sessions, and hotfix testing.
  • Copy environment files and manage per-worktree ports to avoid conflicts.
  • Detect and mitigate dependency drift between worktrees to maintain consistent environments.

Quick Start

Create a new worktree for a specific branch using the defined naming convention, copy environment files, assign a unique port, and verify readiness before proceeding.

Frequently Asked Questions about git-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage parallel git worktrees without cross-branch pollution?

Managing parallel git worktrees without cross-branch pollution requires a routing protocol that isolates feature branches, copies environment files, and enforces port isolation to prevent accidental commits to the wrong branch.

What is the best way to review a PR while continuing work on a feature branch?

The best way to review a PR while continuing work on a feature branch is creating isolated git worktrees for side-by-side testing, allowing long-running tasks to run in a separate environment without interrupting your primary workflow.

How do I prevent port conflicts when running multiple git branches simultaneously?

To prevent port conflicts when running multiple git branches simultaneously, assign unique per-worktree ports through a manager protocol that isolates environments, ensuring side-by-side testing of different branches does not trigger local server collisions.

How does dependency drift detection work across multiple git worktrees?

Dependency drift detection across multiple git worktrees works by verifying environment consistency through a manager protocol, identifying and mitigating package version mismatches before they cause failures during isolated feature development or hotfix testing.

Do I need to manually copy .env files when creating a new git worktree?

You do not need to manually copy .env files when creating a new git worktree if your workflow uses a manager protocol, which automatically handles environment file copying to maintain consistent local configurations across isolated branches.

When should I use git worktrees instead of standard git branching?

You should use git worktrees instead of standard git branching when you need side-by-side testing of multiple branches, such as running long-running tasks in a separate environment or reviewing PRs while continuing feature development simultaneously.