using-git-worktrees

Create isolated Git worktrees under .worktrees/ for parallel feature development.

125|16|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/aaddrick/claude-pipeline --skill using-git-worktrees-aaddrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/aaddrick/claude-pipeline --skill using-git-worktrees-aaddrick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill creates isolated Git worktrees to separate feature development from the main workspace, preventing cross-branch contamination and simplifying concurrent work.

Core Features & Use Cases

  • Isolated workspaces: Create self-contained worktrees under .worktrees/ to run feature work in parallel without switching the main codebase.
  • Safe startup: Ensure the worktree is ignored by Git to avoid accidentally committing worktree contents.
  • Use Case: Start a new feature branch from main, work in a dedicated worktree, and later merge back to the main branch when ready.

Quick Start

Announce: "I'm using the using-git-worktrees skill to set up an isolated workspace." Then run the following commands:

  • git worktree add .worktrees/feature-branch -b feature-branch main
  • cd .worktrees/feature-branch
  • Implement changes, run tests, and push as needed.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I isolate feature development from my main Git workspace?

Git worktrees create isolated workspaces under a .worktrees/ directory, allowing you to run feature branches in parallel without switching or disturbing your main working tree. This prevents cross-branch contamination during concurrent development.

What is the best way to work on multiple Git branches at the same time?

Using git worktree add creates self-contained directories for each feature branch. This enables parallel work on multiple branches simultaneously without stashing changes or switching branches in your main codebase.

How do I prevent accidentally committing Git worktree directories?

You must verify that the .worktrees/ directory is ignored by Git before starting. This safe startup precaution ensures your worktree contents are not accidentally committed to your main repository.

How do I set up a new Git worktree for a feature branch?

Run git worktree add .worktrees/feature-branch -b feature-branch main, then navigate into the new directory to implement changes, run tests, and push as needed before merging back.

When should I use Git worktrees instead of standard branch switching?

Use Git worktrees when starting new features or experiments to avoid disturbing your current working tree. They are ideal for parallel work where you need to test or run multiple branches without cross-branch contamination.