git-worktree

Automates Git worktree creation, listing, switching, and cleanup via a Bash script.

1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/weorbitant/compound-engineering-feat-python-plugin --skill git-worktree-weorbitant
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/weorbitant/compound-engineering-feat-python-plugin/tree/main/skills/git-worktree
Command: npx skills add https://github.com/weorbitant/compound-engineering-feat-python-plugin --skill git-worktree-weorbitant

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates the management of Git worktrees to enable isolated parallel development.

Core Features & Use Cases

  • Create worktrees from a base branch (default main) with automatic environment file propagation.
  • List, switch, and clean up worktrees to maintain an organized development surface.
  • Auto-manages the .gitignore entry for .worktrees/ and ensures consistent directory structure to prevent accidental commits outside the main history.
  • Designed for seamless integration into code-review workflows, experimental features, and parallel development across multiple branches.

Quick Start

Run the worktree-manager.sh to create a new worktree for a feature branch.

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 is automated by running a Bash script that creates, lists, switches, and cleans up isolated working directories. It automatically propagates environment files and manages the .gitignore entry for the .worktrees/ directory.

How do I create a Git worktree and automatically copy my environment files?▼

To create a Git worktree with your environment files, run the worktree-manager.sh script targeting a feature branch. It automatically propagates your environment configurations from the base branch to the new worktree.

Do I need to manually update .gitignore when adding a Git worktree directory?▼

You do not need to manually update .gitignore when adding a Git worktree directory. The script auto-manages the .gitignore entry for .worktrees/ to ensure a consistent directory structure and prevent accidental commits.

What is the best way to clean up Git worktrees after finishing a code review?▼

The best way to clean up Git worktrees after a code review is to use the script's built-in cleanup functionality. It safely removes isolated worktrees and maintains an organized development surface with safe fallbacks.

Does this Git worktree automation work without any external dependencies besides git?▼

This Git worktree automation works solely with git access and requires no external dependencies. It runs via a small Bash script that includes input validation and safe fallbacks for environment management.