using-git-worktrees

Create isolated Git worktrees with directory-priority setup and ignore verification.

1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/BlackRoad-OS-Inc/blackroad-operator --skill using-git-worktrees-blackroad-os-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/BlackRoad-OS-Inc/blackroad-operator/tree/main/agents/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/BlackRoad-OS-Inc/blackroad-operator --skill using-git-worktrees-blackroad-os-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work by creating separate Git worktrees that share the same repository, preventing changes in the main workspace from leaking into experiments.

Core Features & Use Cases

  • Directory priority-based setup using project-local and global worktree locations
  • Safety verification to ensure worktrees are ignored by git and do not pollute the main repo
  • Automatic setup and switch into the new worktree for quick start on new features

Quick Start

Initialize an isolated git worktree following the priority rules and safety checks, then switch to the new workspace.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I create isolated git worktrees for feature development?

To create isolated git worktrees, the tool provisions a separate directory sharing the main repository, preventing changes from contaminating the main workspace. It applies directory-priority selection to locate the optimal setup folder and switches into the new workspace automatically.

What is the best way to isolate experimental git branches from my main workspace?

Using git worktrees is the best way to isolate experimental branches because they share the same repository without leaking changes into the main workspace. This enables safe, repeatable setup across projects for local multi-branch development scenarios.

How do I ensure my git worktree directory is properly ignored by the main repository?

To ensure your worktree directory is ignored, the tool performs safety verification using git check-ignore. This prevents the newly created worktree directory from polluting the main repository's tracking status.

Can I configure global versus project-local git worktree installation?

Yes, you can configure global versus project-local installation. The tool implements directory-priority selection, checking locations like .worktrees, worktrees, and CLAUDE.md to determine the optimal setup path before creating the worktree.

Why does my git worktree setup keep polluting the main repository?

Your git worktree setup might pollute the main repository if the directory is not properly ignored. The tool prevents this by applying ignore verification with git check-ignore before finalizing the worktree creation.