using-git-worktrees

Creates isolated Git worktrees for per-branch development without disturbing the main checkout.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates isolated git worktrees to safely develop features without disturbing the main workspace.

Core Features & Use Cases

  • Isolated workspaces: create per-branch worktrees that share the same repository, enabling simultaneous development on multiple branches without switching the main checkout.
  • Safe defaults: priority-based directory selection (.worktrees or worktrees) and safety verification to ensure ignored directories are not accidentally committed.
  • Flexible placement: supports local project-local worktrees or a global user-space location for centralized management.

Quick Start

Ask me to set up an isolated git worktree for the current repository.

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 worktree for feature development?

You create an isolated git worktree by initiating a setup process that establishes a per-branch workspace, automatically selecting a local or global directory while verifying gitignore safety to prevent accidental commits.

What is the best way to manage multiple git branches without switching my main workspace?

Using isolated git worktrees is the best way to manage multiple branches simultaneously. Worktrees share the same repository but allow you to develop features in separate directories without constantly switching your main checkout.

Can I use a global directory instead of local project folders for my git worktrees?

Yes, you can use a global user-space location for centralized worktree management. The setup also supports local project directories like .worktrees or worktrees, applying priority-based selection to determine the final placement.

How does git worktree setup ensure ignored directories are not accidentally committed?

Git worktree setup ensures safety by running gitignore verification checks before enabling the worktree. This prevents ignored directories, such as the newly created worktree folders, from being accidentally committed into the repository.

When should I set up a git worktree instead of just switching branches?

You should set up a git worktree when starting feature work that requires isolation or testing changes in a clean environment. Worktrees allow simultaneous development on multiple branches without the overhead of stashing or switching contexts.