using-git-worktrees

Create isolated git worktrees for feature work with automatic project detection.

264|11|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/rkz91/coco --skill using-git-worktrees-rkz91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/rkz91/coco/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/rkz91/coco --skill using-git-worktrees-rkz91

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolates feature work by creating and managing dedicated git worktrees, preventing changes from affecting the main workspace.

Core Features & Use Cases

  • Create project-local or global worktrees with automatic selection based on priority (.worktrees, worktrees), or a user-specified location, and ensure safe setup
  • Verify ignore rules to prevent worktrees from being committed to the repository
  • Auto-detect project name, create a new branch, and bootstrap the appropriate tooling as needed for the project

Quick Start

Initialize an isolated git worktree for your feature work with the preferred location, then run the project setup.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature work from my main git workspace?

Git worktrees isolate feature work by creating a dedicated working directory, preventing changes from affecting the main workspace. This approach creates a new branch and bootstraps the appropriate tooling for the project automatically.

What is the best way to manage multiple git worktrees for feature branches?

Managing git worktrees involves automatic selection based on priority for project-local or global locations. The process auto-detects the project name, creates a new branch, and bootstraps the environment as needed for safe feature development.

How do I prevent git worktrees from being committed to the repository?

To prevent git worktrees from being committed, the setup verifies ignore rules before creation. This ensures the worktree directories are safely ignored by the repository configuration and do not pollute the main branch history.

Can I set up a git worktree in a global location instead of project-local?

Git worktree creation supports both project-local and global locations with automatic selection based on priority. You can specify a user-specified location to safely isolate feature work outside the main repository directory if preferred.

Does creating a git worktree automatically bootstrap the project environment?

Creating a git worktree automatically bootstraps the appropriate tooling as needed for the project. After isolating the feature work in the preferred location, the setup process initializes the environment for immediate development.

When should I use git worktrees instead of branching directly in the main repository?

Git worktrees are needed when you want to work on a feature without mutating the main branch workspace. They provide isolation and safety by keeping separate directories for each feature, preventing file switching conflicts.