using-git-worktrees

Create isolated Git worktrees with automatic environment setup.

47|11|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/tylerwind/LabVIEW-WPF-UI-Generator --skill using-git-worktrees-tylerwind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/tylerwind/LabVIEW-WPF-UI-Generator/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/tylerwind/LabVIEW-WPF-UI-Generator --skill using-git-worktrees-tylerwind

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees enable isolated workspaces that share the same repository, allowing feature work on separate branches without switching context and risking mainline stability.

Core Features & Use Cases

  • Priority-driven directory discovery for worktrees (.worktrees, worktrees) with optional global location and preferences via a superpowers rule.
  • Safety verification to ensure the chosen directory is ignored by Git, with automatic updates to .gitignore when needed to prevent accidental commits of worktree contents.
  • Automated worktree creation and environment setup: detects the project name, creates the worktree, and auto-installs and runs project setup commands as needed, followed by a clean baseline check.
  • Clear reporting of the worktree location and readiness status to streamline handoff to feature development or post-workflow cleanup.

Quick Start

Set up an isolated Git worktree for a new feature by choosing the best directory and validating ignore rules.

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 worktree for a new feature branch?

To create an isolated git worktree, the system uses priority-driven directory discovery to find a location, validates ignore rules, and sets up the worktree with automated environment setup commands for safe feature development.

Why does git worktree content show up in my main repository commits?

Git worktree content appears in commits when the worktree directory is not ignored. The system prevents this by verifying safety rules and automatically updating .gitignore to exclude worktree directories from accidental commits.

What is the best way to manage git branches without switching context in my main workspace?

Using git worktrees is the best way to manage branches without switching context, as it creates isolated workspaces sharing the same repository, keeping feature work separate from the main workspace and protecting mainline stability.

How do I ensure my git worktree has the correct project dependencies installed automatically?

The automated environment setup detects the project name, creates the worktree, and auto-installs dependencies by running project setup commands as needed, followed by a clean baseline check to ensure readiness for feature development.

Can I specify a global directory location for my git worktrees instead of the project folder?

Yes, you can use a global location for git worktrees. The directory discovery follows a strict priority, checking local directories like .worktrees or worktrees first, then applying optional global paths and preferences via superpowers rules.

What are the limitations of using git worktrees for branch isolation?

A key limitation is ensuring the worktree directory is properly ignored by Git to prevent accidental commits. The system mitigates this by strictly validating ignore rules and updating .gitignore, but users must manage post-workflow cleanup manually.