Skip to content

Git worktree setup for working on several branches at once, with stacked PR and parallel server patterns.

CCM score
54 of 100
skills.sh installs
379
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers creating, listing, removing, and pruning worktrees, plus a recommended sibling-directory layout for them
  • Includes stacked PR, parallel development, and PR review workflows, each with concrete git worktree add commands
  • Explains the trade-off between symlinking node_modules and installing separately, and when to use each
  • Designed for developers running multiple branches or dev servers who want to avoid repeated git checkout switching

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill git-worktrees -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Git Worktrees

Overview

Git worktrees allow you to have multiple working directories from the same repository, each with a different branch checked out. Work on multiple branches simultaneously without switching.

When to Use Worktrees

✅ Perfect For:

  • Stacked PR development (one worktree per PR)
  • Urgent hotfix while working on feature
  • Parallel development on multiple features
  • Code review in isolation
  • Testing cross-branch interactions
  • Running multiple dev servers simultaneously

⚠️ Consider Alternatives When:

  • Limited disk space (worktrees duplicate working directory)
  • Simple branch switching is sufficient
  • Only working on one branch at a time

Basic Workflow

Create Worktree

New Branch:

# Create worktree with new branch
git worktree add ../worktrees/feature-auth -b feature/authentication

# Navigate to worktree
cd ../worktrees/feature-auth

Existing Branch:

# Create worktree from existing remote branch
git worktree add ../worktrees/feature-profile feature/user-profile

# Or from origin
git worktree add ../worktrees/review origin/feature/pr-to-review

List Worktrees

git worktree list

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Git & Releases
First seen
Jun 3, 2026

Questions

What is the git-worktrees skill for?

The git-worktrees skill teaches an agent to use git worktrees for parallel development on multiple branches at once. It covers use cases such as stacked PR development, urgent hotfixes during feature work, and running multiple dev servers simultaneously without switching branches.

How do I install the git-worktrees skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill git-worktrees -y in your project. Once installed, the agent can create, list, and remove worktrees for you.

Which other skills are in the Git & Releases category?

The Git & Releases category includes triage, git-guardrails-claude-code, setup-pre-commit, caveman-commit, and pr. This skill focuses specifically on managing multiple working directories so each branch stays checked out in its own folder.

Does git-worktrees need extra tools or accounts?

The skill relies on git itself, and its examples assume a standard git repository with remote branches. Worktrees duplicate the working directory, so you need enough disk space for each one.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Git Worktrees

More Git & Releases