using-git-worktrees

Create isolated git worktrees for parallel feature development without branch switching.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/withmartian-sandbox-darkside/ghrc-y-3126672651424eddb640ecc81321a665 --skill using-git-worktrees-withmartian-sandbox-darkside
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/withmartian-sandbox-darkside/ghrc-y-3126672651424eddb640ecc81321a665/tree/main/default/skills/using-git-worktrees
Command: npx skills add https://github.com/withmartian-sandbox-darkside/ghrc-y-3126672651424eddb640ecc81321a665 --skill using-git-worktrees-withmartian-sandbox-darkside

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates isolated repository workspaces to avoid branch switching, prevent workspace pollution, and enable parallel feature development while enforcing safety checks that stop accidental commits of worktree contents.

Core Features & Use Cases

  • Isolated workspace creation: Adds git worktrees into a project-local or global worktrees directory so multiple features can be developed concurrently without switching branches.
  • Directory selection policy: Prefers existing .worktrees/ over worktrees/, respects CLAUDE.md preferences, and prompts the user when ambiguous.
  • Safety verification & baseline checks: Ensures project-local worktree directories are present in .gitignore (and adds+commits them if not), auto-detects project files to run dependency installs, and runs baseline tests before starting implementation.
  • Use case: Start a new feature branch in a safe, isolated worktree, run dependency setup and tests, then proceed to implement without affecting the main workspace.

Quick Start

Create a new isolated worktree for branch feature/auth in .worktrees, ensure .worktrees is in .gitignore and committed, run dependency installation detected from project files, and run the baseline tests before implementing the feature.

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 parallel feature development?

Create isolated git worktrees to develop multiple features concurrently without branch switching by adding worktree directories to your project, verifying .gitignore, and running baseline tests. This prevents workspace pollution.

What is the best way to manage git worktrees without committing them accidentally?

Manage git worktrees safely by verifying the worktree directory is present in .gitignore, automatically adding and committing it if missing, preventing accidental commits of worktree contents into the main repository.

How do I set up a new feature branch using git worktrees and run dependency installation?

Set up a new feature branch using git worktrees by creating an isolated workspace, auto-detecting project type for dependency installation, and running baseline tests before proceeding with implementation.

Does git worktree creation support custom directory naming like .worktrees or worktrees?

Git worktree creation supports custom directory selection by preferring existing .worktrees/ over worktrees/, respecting CLAUDE.md preferences, and prompting the user when directory paths are ambiguous.

Why should I use git worktrees instead of switching branches for multiple features?

Use git worktrees instead of switching branches to enable parallel feature development and prevent workspace pollution, allowing multiple isolated workspaces to operate concurrently without affecting the main repository.

Can I run baseline tests in a git worktree before starting feature implementation?

Run baseline tests in a git worktree before feature implementation by creating the isolated workspace, auto-detecting project files to install dependencies, and executing tests to ensure a stable starting point.