using-git-worktrees

Create isolated git worktrees with automatic directory selection and safety checks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/fernandoxavier02/Superpower-Gemini --skill using-git-worktrees-fernandoxavier02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/fernandoxavier02/Superpower-Gemini/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/fernandoxavier02/Superpower-Gemini --skill using-git-worktrees-fernandoxavier02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work and experiments directly in the main workspace can cause instability and clutter; this skill creates isolated git worktrees with smart directory selection and checks to keep your main repo clean.

Core Features & Use Cases

  • Directory selection priority: existing .worktrees or worktrees, CLAUDE.md preference, or prompting the user when none exist.
  • Safety verification: ensures local worktrees are ignored in gitignore, and automatically updates ignore rules with a commit when needed.
  • Automated setup and reporting: detects project context (language/tools), creates a new worktree on a new branch, runs setup commands, validates a clean baseline, and reports the worktree location.
  • Use cases include parallel feature development, experiments, and hotfix isolation without disturbing the main branch.

Quick Start

Create an isolated git worktree for the current project with automatic setup and safety checks.

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 work in git without disturbing the main branch?

Git worktrees isolate feature work by creating a separate working directory linked to your repository. This skill automates worktree creation on a new branch, keeping your main workspace clean and stable for parallel development or experiments.

What is the best way to manage multiple git branches for parallel feature development?

Using git worktrees is the best way to manage parallel branches, allowing you to check out multiple branches simultaneously in different directories. This skill automates directory discovery and setup to streamline switching between features without cloning.

How do I ensure my git worktree directories are safely ignored in my repository?

To ensure git worktrees are safely ignored, this skill verifies your .gitignore rules and automatically updates them with a commit if the worktree directory is not already excluded. This prevents worktree files from polluting your main repository status.

Does this git worktree workflow handle project setup for different package managers?

Yes, this git worktree workflow handles project setup by detecting the project context and running the appropriate setup commands for your package managers. This ensures your new worktree has dependencies installed and a validated clean baseline before you start coding.

Can I use git worktrees for hotfix isolation without affecting ongoing feature work?

Yes, you can use git worktrees for hotfix isolation to instantly create a clean workspace from your main branch without affecting ongoing feature work. This skill automates the branch creation and directory selection so you can immediately patch critical issues.

When do I need to use a git worktree instead of a standard git branch?

You need a git worktree when starting feature work or experiments that require an isolated directory, avoiding the instability of switching branches in your main workspace. It is ideal for keeping your main repository clean while testing changes in parallel.