git-worktrees

Create and remove Git worktrees for isolated parallel tasks.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/MacroMan5/claude-code-workflow-plugins --skill git-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/MacroMan5/claude-code-workflow-plugins/tree/main/.claude/skills/git-worktrees
Command: npx skills add https://github.com/MacroMan5/claude-code-workflow-plugins --skill git-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git.

What problem does it solve?

Working on multiple tasks or spikes in a single Git repository can lead to messy branches, conflicting changes, and difficult context switching.

Core Features & Use Cases

  • Parallel Task Isolation: Creates parallel Git worktrees for distinct tasks, ensuring changes are isolated and reviews are clean.
  • Streamlined Workflow: Provides clear commands for creating, switching to, and removing worktrees, simplifying complex Git operations.
  • Use Case: When you need to work on a critical bug fix while a large feature is in progress, use this skill to create a separate worktree for the bug, keeping your main branch clean and focused.

Quick Start

Create a dedicated Git worktree named 'wt-bugfix-123' for a hotfix, based on the 'main' branch.

Frequently Asked Questions about git-worktrees

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

FAQPage Schema
How do I work on multiple Git branches in parallel without switching contexts?

Git worktrees create isolated working directories for each branch, letting you develop multiple tasks simultaneously without context switching. Each worktree has its own checkout, so you can build and test in parallel while keeping changes reviewable and the main repository clean.

When should I use Git worktrees instead of just switching branches?

Use worktrees when handling parallel tasks like a hotfix during feature development, spikes requiring isolation, or frequent diff reviews. Worktrees keep your working tree state intact across tasks, eliminating lost changes and build artifacts that branch switching causes.

What's the safest way to create and remove Git worktrees?

Git worktrees requires a clean repository status before creation. The Skill provides suggested naming conventions, creation and switch commands, and post-merge removal with a cleanup checklist. Commands are echo-only by default, letting you review before executing.

Can I use Git worktrees to keep my repository clean while reviewing changes?

Yes. Worktrees isolate each task's changes into separate directories, ensuring reviews stay focused and clean. Merging and removing a worktree leaves your main branch unaffected, preserving repository organization across parallel development.

Do I need anything besides Git to set up worktrees?

Git is the only dependency. Worktrees are a native Git feature for creating parallel working directories. No additional tools or configuration beyond a standard Git repository are required.