git-worktrees

Create, switch, and remove dedicated Git worktrees for parallel development.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill git-worktrees-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/git-worktrees
Command: npx skills add https://github.com/matt-riley/agent-skills --skill git-worktrees-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Git worktrees enable safe parallel development by letting multiple isolated checkouts live alongside the main repo, reducing merge conflicts and cross-branch interference during feature work, fixes, and experiments.

Core Features & Use Cases

  • Create, switch, and manage dedicated worktrees for task-specific branches without touching the main checkout.
  • Recover from misconfigurations, prune stale registrations, and safely retire completed worktrees with guided workflows.
  • Use cases include parallel PR work, lane-based experimentation, and safe recovery workflows in monorepos.

Quick Start

Create a dedicated worktree for your next task from the base branch and begin changes in isolation.

Frequently Asked Questions about git-worktrees

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

FAQPage Schema
How do I run parallel Git branches without merge conflicts in a monorepo?

Git worktrees let you isolate parallel development tasks by creating dedicated checkouts alongside your main repository. This setup reduces cross-branch interference and merge conflicts during feature work, fixes, and experiments in monorepos.

What is the best way to manage multiple isolated checkouts for parallel PR work?

Managing isolated checkouts for parallel PR work involves creating dedicated Git worktrees for task-specific branches. This lifecycle approach handles creating, switching, and removing worktrees, ensuring safe branch management without touching the main checkout.

How do I recover from a stale or misconfigured Git worktree?

Recovering from misconfigured Git worktrees requires pruning stale registrations and safely retiring completed checkouts. The guided recovery workflow helps clean up orphaned branches and restore your repository to a functional state.

Can I use Git worktrees for multi-agent lane-based experimentation?

Git worktrees support multi-agent lanes and parallel experimentation by providing isolated branch environments. Each agent or task receives a dedicated checkout, enabling concurrent work safely without interfering with the main repository state.

When should I avoid using Git worktrees for branch isolation?

Git worktrees might be unnecessary for simple, sequential branch work where parallel isolation is not required. If your workflow involves single-branch linear development without concurrent PRs or multi-agent tasks, standard branching offers sufficient isolation.