git-worktree

Create and manage isolated Git worktrees under .worktrees.

1|Updated Jun 28, 2026
One-click install
npx skills add https://github.com/whmathews15/DEX-Personal-Operating-System --skill git-worktree-whmathews15
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/whmathews15/DEX-Personal-Operating-System/tree/main/.claude/plugins/compound-engineering/skills/git-worktree
Command: npx skills add https://github.com/whmathews15/DEX-Personal-Operating-System --skill git-worktree-whmathews15

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It removes the friction of creating, switching, and cleaning up Git worktrees so you can work on multiple branches in parallel without manual bookkeeping.

Core Features & Use Cases

  • Create isolated worktrees for feature work or PR review without disturbing your main checkout.
  • List and switch worktrees to move between parallel tasks quickly.
  • Safe cleanup and environment setup automatically copies environment files, keeps .worktrees ignored, and confirms removals before deleting inactive worktrees.

Quick Start

Ask the git-worktree skill to create a worktree named feature-login from main and switch you into it.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I create an isolated Git worktree for parallel feature development?

You can list and switch between active Git worktrees using the interactive bash script, which displays available branches and moves your working directory into the selected worktree without disturbing your main checkout.

What is the best way to clean up completed Git worktrees safely?

The best way to clean up completed Git worktrees safely is using an interactive script that confirms removals before deleting inactive worktrees stored under the .worktrees directory, preventing accidental data loss.

Can I review pull requests using Git worktrees without affecting my main checkout?

Yes, you can review pull requests using isolated Git worktrees that keep your main checkout untouched, automatically copying environment files to ensure the reviewed code runs correctly in its own working directory.

How do I copy .env files automatically when setting up a new Git worktree?

The script copies .env files automatically during worktree creation to mirror your environment setup, ensuring parallel branches have the necessary local configuration without requiring manual file duplication.

Does Git worktree management work with branches that store directories under .worktrees?

Git worktree management works specifically with repositories that store worktrees under the .worktrees directory, automatically updating .gitignore to keep these paths untracked while managing parallel branch switching.