git-worktree

Manage Git worktrees for parallel development with centralized storage and cleanup.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill manages Git worktrees via a single manager script, handling environment file copying, storage, and cleanup.

Core Features & Use Cases

  • Manager Script: Centralized worktree operations.
  • Env Copying: Automatic copying of .env* files to new worktrees.
  • Storage & Cleanup: Centralized storage and cleanup automation.

Quick Start

Create a new worktree with the manager, then switch into the new .worktrees/<branch> directory.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I work on multiple git branches simultaneously without stashing changes?

Git worktrees let you check out multiple branches at once in isolated directories, eliminating the need to stash. This Skill manages worktrees centrally, creating separate environments for each branch so you can switch between them instantly while preserving all uncommitted work.

How do I set up isolated development environments for features and fixes?

Create a new worktree using the manager script, which automatically copies .env files and stores the worktree in .worktrees/<branch>. Each worktree is a complete, isolated environment for parallel development without interfering with your main working directory.

Can I review pull requests without losing my current work in progress?

Yes. Worktrees let you check out a PR branch in a separate directory while keeping your current work intact. Switch between worktrees instantly to review code, test changes, or debug without stashing or losing context.

What's the best way to manage and clean up merged worktrees?

This Skill provides centralized cleanup automation to remove merged or stale worktrees. The manager script tracks all worktrees in .worktrees, making it easy to list, identify, and delete old branches without manual directory management.

How do environment files get synchronized across worktrees?

The Skill automatically copies .env* files to new worktrees during creation, ensuring each isolated environment has the configuration it needs. This unified approach eliminates manual env setup for every branch switch.

Do I need git installed to use worktree management?

Yes, git is a required dependency. This Skill wraps git worktree commands in a centralized manager script, so you need a working git installation to create, switch, and manage worktrees.