git-worktree

Manage Git worktrees for parallel development via a manager script.

50|2|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/roberto-mello/beads-compound-plugin --skill git-worktree-roberto-mello
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/roberto-mello/beads-compound-plugin/tree/main/plugins/beads-compound/gemini/skills/git-worktree
Command: npx skills add https://github.com/roberto-mello/beads-compound-plugin --skill git-worktree-roberto-mello

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Git worktrees enable parallel development without creating duplicate repositories. This skill provides a safe, guided way to create, switch, and clean up worktrees, while automatically managing environment files and gitignore entries.

Core Features & Use Cases

  • Create new worktrees from main with a corresponding feature branch
  • List and monitor all existing worktrees
  • Switch between worktrees with automatic directory changes
  • Automatically copy environment files and update .gitignore
  • Safety prompts before destructive actions

Quick Start

Run the worktree-manager.sh script to create, list, switch, and clean up worktrees, with automatic env file copying and .gitignore management.

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 features?

Manage Git worktrees for parallel development by using a single manager script to create new worktrees from main, list existing ones, switch directories, and clean up inactive branches with safety prompts.

How do I copy environment files when creating a new Git worktree?

Copy environment files automatically when creating a new Git worktree by running the manager script, which duplicates env files into the new worktree directory and updates .gitignore entries to protect sensitive data.

What is the safest way to clean up inactive Git worktrees without losing changes?

The safest way to clean up inactive Git worktrees is using a manager script that enforces explicit confirmation prompts before executing destructive cleanup actions, preserving main branch integrity.

Can I switch between Git worktrees and have the directory change automatically?

Yes, you can switch between Git worktrees with automatic directory changes by executing the worktree manager script, which handles the underlying branch switching and environment file synchronization seamlessly.

Do I need to manually update .gitignore when setting up Git worktrees?

No, you do not need to manually update .gitignore when setting up Git worktrees because the manager script automatically modifies .gitignore to exclude copied environment files during worktree creation.

Why use a dedicated script for Git worktrees instead of native Git commands?

Use a dedicated script for Git worktrees to enforce safe usage through automatic environment file copying, .gitignore updates, and explicit safety prompts that prevent accidental destructive actions during parallel development.