using-git-worktrees

Create an isolated Git worktree for feature development with baseline tests.

15|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/mahoushoujyo-eee/eshell --skill using-git-worktrees-mahoushoujyo-eee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/mahoushoujyo-eee/eshell/tree/main/.codex/skills/using-git-worktrees
Command: npx skills add https://github.com/mahoushoujyo-eee/eshell --skill using-git-worktrees-mahoushoujyo-eee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents feature work from polluting the current branch by creating and validating an isolated Git workspace before implementation begins.

Core Features & Use Cases

  • Isolation Detection: Identifies existing linked worktrees, submodules, branch state, and repository layout before making changes.
  • Safe Workspace Creation: Prefers native worktree tools, then falls back to Git worktrees with directory and ignore-file safety checks.
  • Project Readiness: Installs detected dependencies, runs baseline tests, and reports whether the workspace is ready for implementation.
  • Use Case: Use it before implementing a feature when you need to preserve the current checkout and establish a clean, independently testable branch.

Quick Start

Ask the skill to prepare an isolated worktree for the feature you are about to implement and verify that the project baseline passes.

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 workspace without losing my current checkout?

To create an isolated Git workspace without losing your current checkout, use Git worktrees to establish a separate branch in a new directory. This preserves your active branch state while allowing independent feature development.

What is the best way to manage feature branches and prevent workspace pollution?

Managing feature branches to prevent workspace pollution is best achieved using Git worktrees. This approach isolates new features in a dedicated directory, keeping the main repository checkout clean and untouched during development.

Does Git worktree isolation work with project submodules and existing dependencies?

Git worktree isolation does work with project submodules and existing dependencies. The setup process detects linked worktrees and submodules, then safely installs required dependencies within the isolated workspace before development begins.

How do I set up a Git worktree and verify the project baseline passes?

To set up a Git worktree and verify the project baseline, create the isolated workspace using native worktree tools or Git commands. The system then runs project-specific test commands to report if the baseline passes successfully.

Why should I use Git worktrees for feature development instead of standard branching?

You should use Git worktrees for feature development instead of standard branching to maintain multiple working directories simultaneously. This prevents context switching between branches and ensures current implementation work remains isolated and independently testable.

What are the limitations of using Git worktrees for repository isolation?

Limitations of using Git worktrees for repository isolation include requiring native worktree support or a local Git installation. Additionally, complex repository layouts with existing linked worktrees require careful detection to avoid directory conflicts.