using-git-worktrees

Create isolated git worktrees with automatic setup and safety checks.

4|2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/lyfe2025/lyfes-coding-skills --skill using-git-worktrees-lyfe2025
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/lyfe2025/lyfes-coding-skills/tree/main/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/lyfe2025/lyfes-coding-skills --skill using-git-worktrees-lyfe2025

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you create isolated git worktrees to safely develop features without mutating the main branch. It provides a clear directory selection process and safety checks to keep your workspace clean and reproducible.

Core Features & Use Cases

  • Isolated development: Create dedicated worktrees for feature work, bugfixes, or experiments.
  • Safe setup: Validate ignore rules and automatically initialize worktrees with the correct branch.
  • Flexible locations: Support project-internal and global worktree locations for scalable workflows.
  • Use case: When starting a new feature, spin up a worktree for feature/auth and keep main branch pristine.

Quick Start

Use the skill to create a new isolated worktree for your next feature:

  • Check existing worktree directories.
  • Create the worktree with git worktree add <path> -b <branch>.
  • Run project setup and tests in the new worktree.

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, run a setup process that validates ignore rules, selects an appropriate directory, and executes git worktree add to establish a dedicated branch without mutating your main repository.

What is git worktree isolation and when do I need it?

Git worktree isolation is a branching workflow that creates separate working directories linked to the same repository. You need it when you want to develop features or experiments safely without affecting the pristine main branch.

Can I set up git worktrees in global locations outside my project directory?

Yes, you can set up git worktrees in both project-internal and global external locations. The setup process guides directory selection to support scalable branching workflows across various environments while maintaining safety checks.

What's the best way to automate git worktree setup for new branches?

The best way to automate git worktree setup is by using a guided workflow that checks existing directories, validates ignore rules, runs git worktree add with a new branch, and reports readiness for immediate development.

Why does my git worktree workflow need ignore validation before branching?

Ignore validation is needed before branching to ensure your workspace remains clean and reproducible. It prevents untracked files and build artifacts from polluting the new worktree environment during automated environment setup.