using-git-worktrees

Set up isolated git worktrees for feature work with directory discovery and ignore checks.

9|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/hongmaple0820/agent-academy --skill using-git-worktrees-hongmaple0820
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/hongmaple0820/agent-academy/tree/main/skills/others/using-git-worktrees
Command: npx skills add https://github.com/hongmaple0820/agent-academy --skill using-git-worktrees-hongmaple0820

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolating ongoing feature work from the current workspace to avoid contaminating the main repository and to enable parallel development.

Core Features & Use Cases

  • Discovery-first setup using existing local directories (.worktrees or worktrees) or a CLAUDE.md preference to determine the target location.
  • Safety checks to ensure worktree directories are ignored by git, preventing accidental commits, with guidance to fix ignores when needed.
  • Flexible location options including project-local or global worktree storage, plus automatic baseline setup after creation.

Quick Start

Initiate an isolated git worktree for the current project.

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 worktrees for parallel feature development?

To create isolated git worktrees, the skill sets up separate working directories using existing local folders like .worktrees or a CLAUDE.md preference, enforcing directory discovery order to safely isolate feature work from the main repository.

What is the best way to prevent accidental commits when using git worktrees?

Preventing accidental commits in git worktrees requires safety checks to ensure worktree directories are covered by git ignore rules, prompting with guidance to fix ignores when needed so worktree files stay out of the main repository.

Can I store git worktrees globally instead of using a project-local directory?

You can store git worktrees globally or in project-local locations, with flexible options that support automatic baseline setup after creation to enable parallel development across multiple branches and projects.

Why does my git worktree setup fail when the directory is not ignored?

Git worktree setup fails when the target directory is not ignored because the skill enforces safety checks to prevent accidental commits, prompting you with guidance to fix ignore rules before proceeding with worktree creation.

When do I need to set up git worktrees for my development workflow?

You need to set up git worktrees when starting feature work or implementing plans across multiple branches and projects, providing safe directory isolation to avoid contaminating the main workspace and enabling parallel development.