git-worktree

Create and switch isolated Git worktrees via worktree-manager.sh.

4|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill git-worktree-linehaul-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/linehaul-ai/linehaulai-claude-marketplace/tree/main/.claude-plugin/git-worktree
Command: npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill git-worktree-linehaul-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you start isolated Git worktrees to run parallel feature development without disturbing your main workspace, reducing context-switching and merge conflicts.

Core Features & Use Cases

  • Isolated worktrees: Create separate directories with their own checked-out branches.
  • Environment parity: Copy environment files to new worktrees to preserve local settings.
  • Workflow isolation: List, switch, and clean up worktrees to keep your repository tidy.
  • Use case: When working on two features at once or testing a hotfix without impacting your main.

Quick Start

Use the worktree-manager.sh script to create a new worktree, for example: ~/.claude/plugins/installed/git-worktree/scripts/worktree-manager.sh create feature-my-feature

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage multiple Git branches in parallel without stashing changes?

Git worktrees let you create isolated directories with separate checked-out branches, eliminating the need to stash. Each worktree maintains its own branch state, enabling true parallel development across multiple features simultaneously without context switching.

Can I create a hotfix while keeping my main workspace untouched?

Yes. Git worktrees isolate your work into separate directories. You can create a new worktree for the hotfix branch while your primary workspace remains on your feature branch, then merge the hotfix without disrupting active development.

How do I set up environment parity across worktrees?

The worktree-manager.sh script automatically copies environment files into each new worktree during creation. This preserves your local settings and configuration across isolated branches, ensuring consistent setup without manual duplication.

What's the best way to organize and clean up multiple worktrees?

Use the worktree-manager.sh script to list, switch between, and clean up worktrees. The Skill ensures .worktrees is gitignored and manages worktree lifecycle, keeping your repository tidy while maintaining isolation across parallel development efforts.

Do I need to worry about merge conflicts when using worktrees?

Worktrees reduce merge conflicts by isolating parallel work into separate directories with independent branch checkouts. Each worktree coordinates with main repository branches, minimizing conflicts compared to stashing or switching contexts on a single branch.