using-git-worktrees

Create isolated git worktrees and verify baseline tests.

Updated Feb 14, 2026
One-click install
npx skills add https://github.com/jbro/pi-agent --skill using-git-worktrees-jbro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/jbro/pi-agent/tree/main/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/jbro/pi-agent --skill using-git-worktrees-jbro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work by using Git worktrees to avoid disrupting the current workspace and to enable parallel development across branches.

Core Features & Use Cases

  • Isolated workspaces that share the same repository, allowing simultaneous feature development without checkout churn.
  • Priority-based directory selection: .worktrees (hidden), worktrees, and user direction via AGENTS.md, with safe fallbacks.
  • Safety verification: enforce git check-ignore on the project-local directory, and auto-add to .gitignore when needed; supports both project-local and global worktrees.
  • Creation and setup: detect project name, create the new worktree, and run common project setup steps (e.g., install dependencies) based on existing manifest files.
  • Baseline verification: run the standard test suites to ensure the new worktree is clean before proceeding.

Quick Start

Create an isolated git worktree for your current project and verify the new worktree passes the baseline tests.

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 across multiple git branches without checkout churn?

Git worktrees isolate feature development by creating linked workspaces sharing the same repository. This allows simultaneous multi-branch development without disrupting your current workspace or requiring constant checkout switching.

How do I create a git worktree and ensure the new workspace passes baseline tests?

Creating a git worktree involves directory discovery, safety verification, worktree creation, project setup, and baseline test validation. The process detects your project name, runs setup steps like dependency installation, and executes standard test suites to verify cleanliness.

How does git check-ignore safety verification work when setting up worktrees?

Git check-ignore safety verification enforces ignore rules on the project-local directory during worktree setup. It automatically adds the worktree directory to .gitignore when needed, ensuring isolated workspaces remain untracked by the main repository.

Can I use project-local worktrees or do I need global worktree configuration?

Git worktrees support both project-local and global configurations. Priority-based directory selection checks hidden .worktrees folders, visible worktrees directories, and user direction via AGENTS.md, applying safe fallbacks for either local or global worktree creation.

What's the best way to manage parallel feature branches and experiment isolation in local projects?

Git worktrees provide the best approach for parallel feature branches and experiment isolation in local projects. They create isolated workspaces sharing the same repository, enabling safe integration planning and simultaneous development without affecting your primary working directory.