using-git-worktrees

Create isolated git worktrees for feature branches and verify cleanup.

4|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/aaaa47080/stock_agent --skill using-git-worktrees-aaaa47080
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/aaaa47080/stock_agent/tree/main/.opencode/skills/using-git-worktrees
Command: npx skills add https://github.com/aaaa47080/stock_agent --skill using-git-worktrees-aaaa47080

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work using git worktrees to prevent cross-branch contamination and enable safety verification during development.

Core Features & Use Cases

  • Create isolated worktrees for feature branches to work independently from main.
  • Verify ignored worktrees and clean up after feature completion to maintain repository hygiene.
  • Use as part of a safe development workflow when experimenting with new ideas or parallel features.

Quick Start

Create a new feature worktree and begin isolated development for your 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 isolate feature branch work to prevent cross-branch contamination in git?

Use git worktrees to create dedicated working directories for feature branches. This isolates development from the main branch, preventing cross-branch contamination while enabling parallel feature work.

What is the best way to run parallel feature development without affecting my main branch?

Git worktrees provide the best way for parallel feature development by creating separate working directories. This allows independent feature branches to operate without affecting the main branch.

How do I safely clean up git worktrees after feature completion?

Safely clean up git worktrees after feature completion by applying a verification step. This ensures ignored worktrees are properly removed to maintain repository hygiene and prevent leftover artifacts.

Why do I need to verify ignored worktrees when using git worktrees?

Verifying ignored worktrees is needed to maintain repository hygiene and ensure safe cleanup. This verification step prevents orphaned directories from accumulating after feature branch work concludes.

Can I use git worktrees for safety verification during isolated testing?

Yes, you can use git worktrees for safety verification during isolated testing. They provide separate working directories that allow testing new ideas without risking the main branch state.

When do I need a separate working directory for a feature branch instead of a standard checkout?

You need a separate working directory when parallel feature development or isolated testing requires independent branches. Git worktrees prevent cross-branch contamination that standard checkouts risk during simultaneous work.