using-git-worktrees

Create isolated Git worktrees with directory selection and safety checks.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/bearhedge/APE-YOLO --skill using-git-worktrees-bearhedge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/bearhedge/APE-YOLO/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/bearhedge/APE-YOLO --skill using-git-worktrees-bearhedge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers create isolated Git workspaces for feature work without disrupting the main workspace, enabling parallel work and safer experimentation.

Core Features & Use Cases

  • Directory discovery and selection: Chooses an existing local worktree directory (.worktrees or worktrees), or follows a CLAUDE.md preference, or asks the user when needed.
  • Safety verification: Ensures the chosen worktree directory is ignored by git; applies fix-its to .gitignore when necessary; adheres to the “Fix broken things immediately” rule.
  • Automated setup for common stacks: Auto-detects the project type and runs the appropriate setup commands for Node.js, Rust, Python, or Go as needed.
  • Use Case: Start feature work on new branches without disturbing your main branch, run tests, and switch between workspaces seamlessly.

Quick Start

Create a new isolated worktree for a feature branch and start development in that directory.

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 isolated Git workspaces for parallel feature development?

To create isolated Git workspaces, you can use git worktree mechanisms to set up separate directories for parallel feature branches. This allows you to experiment safely without disrupting your main workspace or switching branches constantly.

How do I prevent accidental commits to my main branch when using git worktree?

To prevent accidental commits, this approach applies pre-creation safety checks and validates git ignore rules. It ensures the chosen worktree directory is properly ignored by git, applying fixes to .gitignore when necessary to protect your main branch.

Does git worktree setup support automated environment configuration for Node.js, Python, Go, and Rust?

Yes, git worktree setup supports automated environment configuration for Node.js, Python, Go, and Rust. It auto-detects the project type and runs the appropriate setup commands as needed to prepare your isolated development workspace.

What is the best way to manage multiple worktree directories in an existing project?

The best way to manage worktree directories is by selecting an existing local directory like .worktrees or worktrees. The process follows CLAUDE.md preferences or asks you directly, ensuring directory-priority selection and clear reporting for your project.

Why do my git worktree directories show up as untracked files in my main repository?

Git worktree directories show up as untracked files because they are not properly ignored. You must verify safety by ensuring the chosen worktree directory is added to .gitignore, adhering to the fix broken things immediately rule to prevent accidental commits.