worktree-management

Automate Git worktree creation, submodule initialization, and environment setup per branch.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/zcawood-mie/agentz --skill worktree-management-zcawood-mie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-management
Source: https://github.com/zcawood-mie/agentz/tree/main/skills/worktree-management
Command: npx skills add https://github.com/zcawood-mie/agentz --skill worktree-management-zcawood-mie

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Managing multiple Git worktrees across several repositories can be error-prone and hard to coordinate, leading to diverging workspaces, submodule misconfigurations, and inconsistent dev environments.

Core Features & Use Cases

  • Create isolated worktrees per feature branch from master repos, enabling clean separation of work in progress.
  • Initialize and update submodules one at a time to avoid SSH connection limits and improve reliability.
  • Generate per-worktree build artifacts and copy developer config when needed to streamline onboarding.
  • Provide a repeatable, script-driven workflow that shows progress, handles edge cases, and guides cleanup after merges.

Quick Start

Run the create-worktree.sh script to bootstrap a new worktree for a chosen repo and branch.

Frequently Asked Questions about worktree-management

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

FAQPage Schema
How do I manage Git worktrees across multiple repositories without manual errors?

Managing Git worktrees across multiple repositories requires coordinating branch creation, submodule initialization, and environment setup. Script-driven worktree management automates these steps to prevent diverging workspaces and inconsistent dev environments.

How do I initialize submodules in Git worktrees without hitting SSH connection limits?

Initializing submodules in Git worktrees without hitting SSH connection limits is done by updating submodules one at a time. This sequential initialization approach avoids connection throttling and improves overall reliability during environment setup.

What is the best way to set up isolated development workspaces for feature branches?

The best way to set up isolated development workspaces is creating one worktree per feature branch from master repos. This approach enforces deterministic workflow steps, handles optional submodules, and generates per-worktree build artifacts.

Does Git worktree automation support per-project install steps and environment copying?

Git worktree automation supports per-project install steps and environment copying by using install commands defined per repository. It generates build artifacts and copies developer configuration when needed to streamline onboarding.

Why does submodule initialization fail when creating multiple Git worktrees simultaneously?

Submodule initialization fails when creating multiple Git worktrees simultaneously due to SSH connection limits. Initializing and updating submodules one at a time avoids these connection limits and improves reliability during workspace setup.

Can I use Git worktree management for multi-repo development workflows with submodules?

Git worktree management is designed for multi-repo development workflows with submodules. It orchestrates end-to-end worktree management by automating branch creation, handling optional submodules, and guiding cleanup after merges.