using-git-worktrees

Create isolated Git worktrees with safety checks and branch management.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/gerald-ica/opencode-config-snapshot --skill using-git-worktrees-gerald-ica
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/gerald-ica/opencode-config-snapshot/tree/main/opencode/skills/using-git-worktrees
Command: npx skills add https://github.com/gerald-ica/opencode-config-snapshot --skill using-git-worktrees-gerald-ica

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git feature work often disrupts the current workspace. This Skill creates isolated worktrees to allow concurrent work on new features without altering the main checkout, preserving a clean baseline for all changes.

Core Features & Use Cases

  • Directory-aware worktree creation that prefers project-local directories (.worktrees) and falls back to a global location when needed.
  • Built-in safety verification to ensure new worktrees are ignored by the repository's ignore rules before creation.
  • Automated setup for feature branches with deterministic paths and quick switch to the new worktree to streamline feature development.

Quick Start

Run the using-git-worktrees skill to create an isolated worktree for your current feature 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, the skill identifies a local directory, verifies it is ignored by repository rules, and automatically sets up a deterministic path with branch management to ensure a safe baseline checkout.

Why should I use Git worktrees instead of branching in my main checkout?

Git worktrees provide isolation by allowing concurrent feature work without altering the main checkout, preserving a clean baseline for changes and preventing workspace disruption during development.

Can I specify a custom location for my Git worktree directory?

Yes, the skill operates across existing local worktree directories or prompts for a preferred location, defaulting to project-local directories and falling back to a global location when needed.

Does Git worktree creation verify ignored paths before setting up the environment?

Yes, the setup includes built-in safety verification to ensure new worktree paths are ignored by the repository's ignore rules before creation, preventing accidental file tracking.

What is the best way to manage feature branches across multiple Git worktrees?

The best way is using automated setup for feature branches with deterministic paths, which streamlines development by applying environment safeguards and enabling a quick switch to the new worktree.