using-git-worktrees

Create isolated git worktrees for feature branches with safety checks.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/liamtran96/msm-car-booking --skill using-git-worktrees-liamtran96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/liamtran96/msm-car-booking/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/liamtran96/msm-car-booking --skill using-git-worktrees-liamtran96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. Core principle: Systematic directory selection + safety verification = reliable isolation. Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."

Core Features & Use Cases

  • Isolated workspaces: create per-branch worktrees that share the repo while keeping worktrees separate.
  • Directory prioritization: follow a clear order: existing directories, CLAUDE.md preference, then user prompt.
  • Safety verification: ensure .gitignore prevents accidental commits of worktree contents and prompt for action when needed.
  • Automated setup & verification: optionally run project setup commands and baseline tests to ensure a clean start.

Quick Start

Create an isolated git worktree for your new feature branch by following prompts; the skill will locate or create a dedicated worktree, verify safety constraints, and report the workspace location.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an isolated git worktree for a new feature branch?

Git worktrees allow you to create per-branch workspaces sharing a single repository, enabling simultaneous branch work without directory switching.

How does git worktree directory prioritization work when creating isolated workspaces?

Directory prioritization for git worktrees follows a strict order: existing directories first, then CLAUDE.md preferences, and finally user prompts to determine the optimal workspace location.

Can I run automated setup and baseline tests when creating a git worktree?

Yes, you can run optional project setup commands and baseline test verifications during git worktree creation to ensure the isolated workspace starts from a clean and validated state.

Why does git worktree creation check .gitignore before partitioning workspaces?

Git worktree creation checks .gitignore to prevent accidental commits of worktree contents into the main repository, enforcing safety verification before partitioning your isolated workspaces.

What's the best way to manage multiple git branches simultaneously without switching?

Using git worktrees is the best way to work on multiple branches simultaneously, as they create isolated workspaces sharing the same repository without requiring constant branch switching.