using-git-worktrees

Create isolated git worktrees for feature development with verified setup.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/wewetv1987-cell/openclaw-backup --skill using-git-worktrees-wewetv1987-cell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/wewetv1987-cell/openclaw-backup/tree/main/skills/clawgator-superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/wewetv1987-cell/openclaw-backup --skill using-git-worktrees-wewetv1987-cell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you start feature work in a separate git worktree so you can keep the current workspace untouched, reduce context switching, and avoid mixing unfinished changes.

Core Features & Use Cases

  • Smart directory selection: Chooses an existing worktree directory when available, follows repository preferences when documented, or asks where to create one when no convention exists.
  • Safety verification: Checks that project-local worktree directories are ignored before creation, preventing accidental tracking of worktree contents in git.
  • Project setup and validation: Detects the project type, runs the appropriate dependency setup, and verifies a clean baseline with tests before you begin implementation.
  • Use cases: Ideal for starting a new feature branch, preparing for plan execution, or isolating work for subagent-driven development without disturbing the main checkout.

Quick Start

Tell the assistant to set up an isolated git worktree for your feature and use the repository's preferred worktree location if one is already defined.

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 workspace without disturbing my current checkout?

To create an isolated git workspace, you can set up a git worktree for your feature branch. This creates a separate directory for development, keeping your current workspace untouched and avoiding mixed unfinished changes.

How do I set up a git worktree for feature development without mixing uncommitted changes?

Setting up a git worktree for feature development isolates your changes in a new directory. The workspace verifies project setup and runs baseline tests, ensuring a clean checkout before you begin implementation work.

What is the best way to manage git branch isolation for subagent-driven development?

Git branch isolation for subagent-driven development is best managed by creating a dedicated git worktree. This provides a clean, separate checkout with deterministic directory selection, isolating subagent work from the main repository.

Does git worktree creation automatically check if the worktree directory is ignored for repository safety?

Git worktree creation includes safety verification to check that project-local worktree directories are properly ignored. This prevents accidental tracking of worktree contents in your main git repository.

Can I use an existing worktree directory if my repository has a preferred location defined?

You can use an existing worktree directory if one is available. The workspace setup follows documented repository preferences for directory selection, or prompts you for a location if no convention exists.

Why do I need baseline tests to pass before starting implementation in a new git worktree?

Baseline tests must pass before starting implementation in a git worktree to verify a clean project state. The setup detects the project type, runs dependency installation, and validates test readiness before reporting the workspace as ready.