using-git-worktrees

Create isolated git worktrees for feature development with safety checks.

70|6|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/earchibald/vsc-superpowers --skill using-git-worktrees-earchibald
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/earchibald/vsc-superpowers/tree/main/.agents/skills/worktree
Command: npx skills add https://github.com/earchibald/vsc-superpowers --skill using-git-worktrees-earchibald

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature development often risks impacting the main workspace. This skill creates isolated workspaces using git worktrees so you can work on a feature without altering the active repository state.

Core Features & Use Cases

  • Directory discovery and selection with priority: prefer hidden .worktrees, then worktrees, then a global location.
  • Safety verification: ensure the worktree is ignored by git, update .gitignore if needed, and avoid accidental commits of worktree contents.
  • Automatic project setup: auto-detect project tooling (Node, Python, Rust, etc.) and prepare the worktree accordingly.
  • Use Case: start a new feature in isolation, run tests, and compare changes without touching the main workspace.

Quick Start

Instruct me to set up an isolated git worktree for your current feature development.

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 work without contaminating my current git workspace?

This Skill creates isolated git worktrees for feature work, preventing contamination of your current workspace. It uses smart directory selection and safety checks to ensure your main repository state remains unaltered while developing new features.

How does git worktree directory discovery handle hidden folders and global locations?

Directory discovery prioritizes hidden .worktrees folders, then standard worktrees, followed by a global location. This smart directory selection ensures your isolated feature development workspaces are properly organized and separated from your active repository.

Do I need to manually update .gitignore to prevent accidental commits of my worktree contents?

No manual updates are needed. Safety verification checks local and global ignore rules to ensure worktrees are ignored by git, automatically updating .gitignore if needed to prevent accidental commits of worktree contents.

Can I auto-detect project tooling like Node or Python when setting up a git worktree?

Yes, automatic project setup auto-detects tooling like Node, Python, and Rust when creating an isolated git worktree. It prepares the workspace accordingly, tailoring automatic setup steps to match your specific project environment.

What happens if the directory discovery for my new feature workspace is ambiguous?

When directory discovery is ambiguous, the setup process prompts the user for selection. This ensures you explicitly choose the correct location for your isolated git worktree when multiple valid directory options are found.

What is the best way to run tests and compare changes without touching the main repository?

Using isolated git worktrees is the best way to run tests and compare changes without touching the main repository. This approach separates feature work into a dedicated workspace, keeping your active repository state completely intact.