git-worktree

Manage Git worktrees for isolated parallel development across branches.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/dzackgarza/ai --skill git-worktree-dzackgarza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/dzackgarza/ai/tree/main/opencode/skills/iliaal-compound-engineering-plugin-git-worktree
Command: npx skills add https://github.com/dzackgarza/ai --skill git-worktree-dzackgarza

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Git worktrees can be cumbersome to manage across multiple features; this skill provides a unified interface to create, list, switch, and clean up isolated worktrees with automatic environment file handling and safe prompts.

Core Features & Use Cases

  • Create worktrees from main with consistent naming
  • List current worktrees and their branches
  • Switch between worktrees and clean up inactive ones
  • Automatic .gitignore management and env file copying

Quick Start

Create a new worktree by running the worktree-manager.sh script with a branch name.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage git worktrees for parallel development across multiple branches?

Managing git worktrees for parallel development involves creating isolated directories for each branch. This skill provides a unified manager script to create, list, switch, and clean up worktrees while automatically copying environment files and syncing .gitignore.

What is the best way to copy environment files when creating a new git worktree?

The best way to copy environment files when creating a git worktree is using an automated manager script. This skill automatically copies your env files from the main repository into each newly created per-branch worktree directory.

How do I keep .gitignore in sync across multiple git worktrees?

Keeping .gitignore in sync across multiple git worktrees is handled automatically by the manager script. It enforces safe operations and maintains consistent .gitignore management across all active branches within the dedicated .worktrees directory.

Can I safely clean up inactive git worktrees without losing uncommitted changes?

Yes, you can safely clean up inactive git worktrees because the manager script enforces safe operations with prompts. It ensures inactive worktrees are removed securely without risking your current parallel development environment.

Does this git worktree workflow require any external dependencies?

No, this git worktree workflow does not require external dependencies. It relies on a single internal manager script to handle worktree creation, environment file copying, and branch switching.

When should I use git worktrees instead of cloning a repository multiple times?

You should use git worktrees instead of cloning multiple times when you need isolated parallel development branches sharing a single repository. This approach avoids duplication and simplifies switching between features.