worktree-manager

Manage git worktrees for parallel development across multiple branches.

47|11|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill worktree-manager-majesticlabs-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-manager
Source: https://github.com/majesticlabs-dev/majestic-marketplace/tree/main/plugins/majestic-engineer/skills/git-worktree/scripts/worktree-manager.sh
Command: npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill worktree-manager-majesticlabs-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git.

What problem does it solve?

This is the manager script used by the git-worktree skill to create, list, switch, and cleanup worktrees with environment file synchronization.

Core Features & Use Cases

  • Create: new worktree with optional source branch.
  • List/Switch: view and switch between worktrees.
  • Cleanup: remove merged or stale worktrees.

Quick Start

Run: bash worktree-manager.sh create feature-x

Frequently Asked Questions about worktree-manager

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

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

Git worktrees let you work on multiple branches simultaneously without stashing. Use worktree-manager.sh to create isolated worktrees for each branch, keeping your main workspace clean while developing features in parallel.

Can I review pull requests without losing my current work?

Yes. Create a new worktree for the PR branch instead of switching your main checkout. This preserves your current work in progress and lets you review or test the PR in an isolated environment.

How do I create and switch between git worktrees?

Run `bash worktree-manager.sh create feature-x` to create a worktree. Use the list command to view all worktrees and switch command to move between them without manual git operations.

Do environment files get copied to new worktrees automatically?

Yes. Worktree-manager automatically synchronizes .env files to newly created worktrees, so each isolated environment has consistent configuration without manual copying.

How do I clean up merged or stale worktrees?

Use the cleanup command in worktree-manager.sh to remove merged or abandoned worktrees. Optional force flags let you remove stale worktrees that haven't been updated.

What happens to my repository structure when I add worktrees?

Worktree-manager stores all worktrees under .worktrees/ and automatically updates .gitignore to exclude them, keeping your repository clean and organized.