using-git-worktrees

Create, list, enter, and remove git worktrees for isolated branch checkouts.

42|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/drvoss/everything-copilot-cli --skill using-git-worktrees-drvoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/drvoss/everything-copilot-cli/tree/main/skills/workflow/using-git-worktrees
Command: npx skills add https://github.com/drvoss/everything-copilot-cli --skill using-git-worktrees-drvoss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees let a single repository host multiple active working directories so parallel tasks do not conflict over the same checkout and you avoid repeatedly cloning the repository.

Core Features & Use Cases

  • Create isolated sibling directories for separate branches so agents or developers can work in parallel without stomping on each other's changes.
  • Inspect, enter, and remove worktrees to manage long-lived experiments, hotfixes, and simultaneous feature development streams.
  • Practical guidance for Copilot orchestrators to launch or direct subagents into the correct worktree and keep writable scope narrow and explicit.

Quick Start

Create a sibling worktree and check out the target branch so the agent works only in that dedicated directory, for example add a worktree at ..\repo-feature-api for branch feature/api-contract.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I work on multiple git branches at the same time without cloning the repository again?

Git worktrees allow a single repository to host multiple active working directories, enabling parallel branch checkouts so concurrent tasks do not conflict over the same checkout. This avoids repeatedly cloning the repository.

What is the best way to isolate parallel feature development in git?

Isolating parallel feature development is best achieved by creating sibling worktrees for separate branches. This allows agents or developers to work in parallel without stomping on each other's changes within the same shared object database.

How do I set up a dedicated git worktree for a specific feature branch?

You create a sibling worktree by checking out the target branch into a dedicated directory, such as adding a worktree at a sibling path for the feature branch. This ensures the agent works only within that isolated directory.

Does using git worktrees require duplicating the repository object database?

Using git worktrees does not require duplicating the repository object database. Worktrees preserve a shared object database while providing separate writable surfaces for each concurrent task or branch.

Can I use git worktrees for multi-agent orchestration and hotfixes?

Git worktrees are applicable for multi-agent orchestration, hotfixes, and code reviews where separate writable surfaces are required. They provide operational guidance to direct subagents into the correct worktree and keep writable scope narrow.

How do I manage and remove long-lived git worktree experiments?

You can manage long-lived experiments by inspecting, entering, and removing git worktrees. This operational guidance helps maintain simultaneous feature development streams and cleans up isolated working directories when they are no longer needed.