using-git-worktrees

Creates isolated Git worktrees with safety checks and automated project setup.

1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/fefogarcia/approved-skills --skill using-git-worktrees-fefogarcia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/fefogarcia/approved-skills/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/fefogarcia/approved-skills --skill using-git-worktrees-fefogarcia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating isolated development environments using Git worktrees, ensuring a clean and organized workflow for new features or tasks.

Core Features & Use Cases

  • Isolated Workspaces: Create separate directories for different branches without duplicating the repository.
  • Smart Directory Selection: Automatically finds or prompts for the best location to create worktrees.
  • Safety Verification: Ensures project directories are ignored by Git before creating worktrees to prevent accidental commits.
  • Automated Setup: Detects project types (Node.js, Rust, Python, Go) and runs necessary setup commands.
  • Baseline Testing: Verifies that the new worktree starts with passing tests.
  • Use Case: Before starting a new feature like "user authentication," use this Skill to create a dedicated, clean worktree for it, ensuring your main development branch remains unaffected.

Quick Start

Use the using-git-worktrees skill to create a new worktree for the 'feature/user-auth' branch.

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, this skill intelligently selects a directory location, performs .gitignore safety checks, runs project-specific setup commands, and verifies baseline test integrity for your new branch.

Why use git worktrees instead of cloning a repository multiple times?

Git worktrees provide isolated workspaces for different branches without duplicating the repository. This keeps your main development branch clean and prevents merge conflicts while maintaining a single shared commit history.

How does this skill prevent accidental commits of worktree directories?

The skill performs safety verification by checking your .gitignore file before creating worktrees. This ensures project directories are properly ignored by Git, preventing accidental commits of worktree paths.

Does it verify that tests pass before starting work in a new git worktree?

Yes, baseline testing verifies that the new worktree starts with passing tests. This ensures your isolated environment is functional and clean before you begin developing your new feature.

Can I use git worktrees to work on multiple branches simultaneously?

Git worktrees allow you to create separate directories for different branches simultaneously. This isolation enables parallel feature development while keeping your main development branch unaffected by ongoing work.