using-git-worktrees

Create isolated Git worktrees with automatic setup commands.

2|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/Shana-AE/.shanaae-configs --skill using-git-worktrees-shana-ae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Shana-AE/.shanaae-configs/tree/main/ai/skills/vendor/using-git-worktrees
Command: npx skills add https://github.com/Shana-AE/.shanaae-configs --skill using-git-worktrees-shana-ae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates isolated Git worktrees to safely develop features without impacting the main repository.

Core Features & Use Cases

  • Automatic directory discovery with priority for hidden project-local .worktrees, then worktrees directories, then global locations.
  • Safety verification to ensure the target directory is ignored by Git before creating a worktree, preventing accidental commits of worktree contents.
  • Automatic setup and initialization, including branch creation and environment-specific setup steps (npm, cargo, pip, etc.) based on project files.
  • Use Case: When starting work on a new feature, set up an isolated workspace to experiment without touching the main branch.

Quick Start

Ask me to set up an isolated Git worktree for your current project and I will automatically detect the best location and initialize it.

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?

To create an isolated Git worktree, the tool automatically detects your project context, creates a new branch using git worktree add -b, and runs environment-specific setup commands like npm install or cargo build based on detected project files.

What is the safest way to manage Git worktrees without accidental commits?

Safe Git worktree management requires verifying the target directory is ignored by gitignore before creation. This safety check prevents accidental commits of worktree contents to the main repository branch.

Can I use a global directory location for my Git worktrees?

Yes, you can use global directory locations for Git worktrees. The tool features automatic directory discovery that prioritizes hidden project-local .worktrees, then worktrees directories, and finally supports global locations.

Does Git worktree setup automatically run dependency installation commands?

Yes, Git worktree setup automatically runs dependency installation and build commands. It detects project files and executes appropriate setup steps such as npm install, cargo build, or pip install during worktree initialization.

Why do I need to isolate feature work in a separate Git workspace?

You need to isolate feature work in a separate Git workspace to safely develop and experiment without impacting the main repository. This workspace management approach keeps your main branch stable during feature development.