using-git-worktrees

Create isolated Git worktrees for feature development with automatic detection and fallback.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sammy9322/ventura-dental-facturacion --skill using-git-worktrees-sammy9322
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/sammy9322/ventura-dental-facturacion/tree/main/.agents/skills/using-git-worktrees
Command: npx skills add https://github.com/sammy9322/ventura-dental-facturacion --skill using-git-worktrees-sammy9322

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of conflicting changes, messy workspace states, and accidental branch pollution when working on multiple features, bug fixes, or experimental changes in the same Git repository, keeping your main working branch clean and stable.

Core Features & Use Cases

  • Automatic Isolation Detection: Checks if you are already in an existing linked worktree or git submodule before creating a new workspace to avoid nested or redundant worktrees.
  • Native Tool Prioritization: Uses platform-native worktree creation tools first for seamless integration with your development environment, falling back to manual git worktrees only when no native tool is available.
  • Safety Guardrails: Automatically verifies that project-local worktree directories are added to .gitignore to prevent accidental commits of worktree contents, and falls back to working in the current directory if sandbox permissions block worktree creation.
  • Use Case: If you are starting work on a new billing feature for the Ventura Dental clinic management system, this Skill will set up a dedicated isolated workspace so your changes do not interfere with ongoing work on the patient appointment scheduling module.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for your new feature branch before you start writing any implementation code.

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

To set up an isolated git worktree for feature development, this skill checks for existing linked worktrees or submodules, prioritizes platform-native tools, and falls back to manual git worktree creation to prevent workspace conflicts.

What is the best way to work on multiple git branches without workspace conflicts?

Using git worktrees is the best way to work on multiple branches without workspace conflicts because it creates isolated working directories for each feature, keeping your main branch clean and preventing accidental branch pollution.

Does this git worktree workflow automatically update .gitignore?

Yes, this git worktree workflow automatically verifies that project-local worktree directories are added to .gitignore to prevent accidental commits of worktree contents into your main repository.

Can I create a git worktree inside a git submodule?

No, you should not create a git worktree inside a submodule because this skill includes automatic isolation detection to check if you are already in an existing linked worktree or git submodule, avoiding nested or redundant worktrees.

What happens if sandbox permissions block git worktree creation?

If sandbox permissions block git worktree creation, the workflow falls back to working in the current directory to ensure feature development can proceed safely without raising permission errors.