using-git-worktrees

Create an isolated Git worktree workspace for feature development.

1|Updated May 20, 2025
One-click install
npx skills add https://github.com/vessux/dotfiles --skill using-git-worktrees-vessux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/vessux/dotfiles/tree/main/umbel/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/vessux/dotfiles --skill using-git-worktrees-vessux

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensure an isolated workspace exists for feature work to protect your current branch and workflow.

Core Features & Use Cases

  • Native isolation when supported, with a fallback to manual git worktrees if native tooling is unavailable.
  • Guardrails such as existing isolation detection, submodule checks, and consent handling to prevent workspace conflicts.
  • Reproducible setup: perform project setup and baseline checks inside the isolated workspace before implementation.

Quick Start

Create an isolated workspace for the new feature using native tools when possible, or fall back to git worktrees if native tools are unavailable.

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 workspace for feature work?

Create an isolated workspace for feature work by detecting existing isolation and establishing a new one using native tools. If native tooling is unavailable, fall back to manual git worktrees to protect your current branch state.

What is a git worktree used for in version control?

A git worktree provides workspace isolation for feature work by allowing multiple working directories from a single repository. It protects your current branch state and prevents workflow conflicts during concurrent development.

Does using git worktrees work with submodules?

Git worktrees should avoid submodules because they complicate workspace isolation and can cause conflicts. The workspace setup checks for submodules and prevents workspace creation if they are detected to ensure a clean environment.

What's the best way to protect my current branch during feature development?

Protect your current branch by using an isolated workspace that coordinates branch state preservation. Verify the workspace is clean before starting feature work, ensuring your main workflow remains completely undisturbed.

How do I set up project dependencies in a new git worktree?

Set up project dependencies in a new git worktree by performing baseline checks and project setup steps inside the isolated workspace. This reproducible setup includes installing dependencies, building, and running tests before implementation.

When should I not use git worktrees for feature work?

Avoid using git worktrees when your project contains submodules, as they interfere with workspace isolation. Additionally, if an isolated workspace already exists, creating another one is unnecessary and prevented by consent checks.