Back to Skills

using-git-worktrees

verified

Use when user asks to "create worktree", "isolated workspace", "parallel branch work", or mentions "git worktree", "feature isolation", "branch workspace", or when starting feature work that needs isolation from current workspace.

View on GitHub

Marketplace

humaninloop-plugins

deepeshBodh/human-in-loop

Plugin

humaninloop

Repository

deepeshBodh/human-in-loop
9stars

plugins/humaninloop/skills/using-git-worktrees/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/deepeshBodh/human-in-loop/blob/main/plugins/humaninloop/skills/using-git-worktrees/SKILL.md -a claude-code --skill using-git-worktrees

Installation paths:

Claude
.claude/skills/using-git-worktrees/
Powered by add-skill CLI

Instructions

# Using Git Worktrees

## Overview

Create isolated workspaces sharing the same repository for parallel branch work. Follow systematic directory selection and safety verification to ensure reliable isolation.

**Violating the letter of the rules is violating the spirit of the rules.** Skipping safety verification "just this once" or assuming directory locations are the most common causes of worktree problems.

## When to Use

- Starting feature work requiring isolation from current workspace
- Working on multiple branches simultaneously
- Executing implementation plans in a clean environment (pairs with `humaninloop:plan`)
- Testing changes without affecting the main working directory
- Parallel code review while continuing development

## When NOT to Use

- **Single-branch workflows**: No need for isolation when working linearly
- **Quick fixes on current branch**: Worktrees add overhead for simple changes
- **Non-git repositories**: Worktrees are git-specific
- **Temporary experiments**: A simple branch may suffice
- **When disk space is constrained**: Each worktree duplicates working files

## Red Flags - STOP and Restart Properly

If any of these thoughts arise, STOP immediately:

- "The directory is probably already ignored"
- "I know where worktrees go in this project"
- "Tests are slow, I'll skip baseline verification"
- "This is a simple project, safety checks are overkill"
- "User wants to start quickly, I'll verify later"
- "I've done this before, I can skip the priority order"

**All of these mean:** Rationalization is occurring. Restart with proper process.

## Common Rationalizations

| Excuse | Reality |
|--------|---------|
| "Directory is probably ignored" | Probably =/= verified. One `git check-ignore` command takes seconds. Always verify. |
| "I know where worktrees go here" | Knowledge =/= following process. Check existing directories, then CLAUDE.md, then ask. |
| "Tests are slow" | Slow tests =/= skip tests. Baseline verification prevents hours 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9854 chars