git-worktree

Manage multiple git working directories for parallel development.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/led8/.codex --skill git-worktree-led8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/led8/.codex/tree/main/skills/git-worktree
Command: npx skills add https://github.com/led8/.codex --skill git-worktree-led8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees solve the overhead of managing multiple working directories by enabling several checked-out branches from a single repository, avoiding repeated clones and minimizing context switches.

Core Features & Use Cases

  • Parallel development: work on multiple branches simultaneously without stashing or frequent checkouts.
  • Space-efficient workflows: share the same .git directory while keeping separate working trees.
  • Maintenance workflows: create, list, move, prune, and repair worktrees to streamline repo management.

Quick Start

Create a new worktree for a specified branch in an adjacent directory and start working there.

Frequently Asked Questions about git-worktree

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 enable parallel development by checking out multiple branches simultaneously from a single repository. They share one .git directory across separate working trees, eliminating the overhead of repeated clones and frequent checkouts for parallel feature work.

What is the best way to manage parallel feature development and PR reviews in a single git repository?

Using git worktree automates managing multiple working directories for parallel workflows like PR reviews and feature development. You can create, list, move, and prune separate working trees while sharing a single .git directory to avoid duplicating clones.

How do I create and remove a git worktree for an adjacent directory?

You can create a worktree for a specified branch in an adjacent directory and start working there immediately. The Skill supports creating, moving, removing, locking, and pruning worktrees to streamline repository management and maintenance workflows.

Does git worktree share the same .git directory across all checked-out branches?

Yes, git worktrees share a single .git directory while keeping separate working trees for each checked-out branch. This space-efficient workflow enables parallel development without duplicating repository data or requiring multiple full clones.

Can I use git worktree for repository management tasks like moving and pruning working directories?

Yes, you can use it for maintenance workflows to create, list, move, prune, and repair worktrees. This streamlines repository management by automating the cleanup and organization of working directories tied to a single shared .git directory.

When should I not use git worktree for version control?

You should avoid git worktree if your parallel development workflow requires complete repository isolation rather than sharing a single .git directory. If your repository management needs independent clones without shared references, worktrees may introduce unwanted coupling between branches.