using-git-worktrees

Manage separate project builds for the same or different target frameworks, and optionally the same for different CPU architectures.

8|5|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/axiomantic/spellbook --skill using-git-worktrees-axiomantic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/axiomantic/spellbook/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/axiomantic/spellbook --skill using-git-worktrees-axiomantic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting new feature work directly in the main workspace risks contamination of your environment and makes it hard to reproduce. Git worktrees provide isolated, reproducible workspaces that can be created on demand for a feature branch without touching the main line of development.

Core Features & Use Cases

  • Isolated workspace creation via git worktree to prevent main repository pollution.
  • Safety gates and ignore checks to ensure project-local worktrees do not pollute the repo.
  • Auto-detection of project type and baseline verification to ensure a clean starting point before implementation.

Quick Start

Create a new worktree for your feature and begin development in an isolated 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 an isolated Git workspace for feature branch work?

To create an isolated Git workspace, you use git worktree to generate a reproducible directory for your feature branch. This prevents main repository pollution and ensures a clean starting point before implementation begins.

Why should I use a Git worktree instead of cloning the repository again?

Git worktrees provide isolated, reproducible workspaces on demand without cloning. They apply safety gates and ignore checks to prevent project-local worktrees from polluting the repo, keeping your main line of development completely untouched.

What's the best way to verify a clean baseline before starting feature work?

The best way to verify a clean baseline is using automated worktree setup that auto-detects project type and checks for existing worktrees. This enforces project-local ignore gates and validates the environment before proceeding with implementation.

Does Git worktree isolation work with any project type?

Yes, Git worktree isolation works across project types because the setup process auto-detects the project type. It applies baseline verification to ensure a clean starting point regardless of the specific framework or platform you are using.

How do I prevent my main repository from getting polluted during development?

You prevent main repository pollution by creating an isolated workspace via git worktree. This approach uses safety gates and project-local ignore checks to ensure your feature branch work does not contaminate the main line of development.

What are the limitations of using Git worktrees for isolated development?

Git worktrees require a clean baseline to proceed and enforce project-local ignore gates. If existing worktrees are detected without proper setup, the safety checks will halt the process to prevent repository contamination.