use-git-worktree

Create and manage isolated git worktrees with branch creation and cleanup.

41|4|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/etr/groundwork --skill use-git-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-git-worktree
Source: https://github.com/etr/groundwork/tree/main/skills/use-git-worktree
Command: npx skills add https://github.com/etr/groundwork --skill use-git-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature development by creating and managing dedicated git worktrees so changes stay isolated from the main workspace and merge safely later.

Core Features & Use Cases

  • Create a dedicated worktree per task with a stable branch naming convention.
  • Automatically detect and verify worktree location, ensure it is ignored, and prepare the environment.
  • Run automatic project setup and baseline checks inside the worktree to validate the working state.
  • Provide clear merge and cleanup workflows for auto-merge or manual review.

Quick Start

Create a new task worktree for TASK-NNN, then run the project setup and baseline tests to start work.

Frequently Asked Questions about use-git-worktree

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

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

To isolate feature development, you can create a dedicated git worktree with a stable branch naming convention. This keeps changes physically separated from your main workspace directory for safe merging later.

What's the best way to manage multiple task branches without checkout conflicts?

Managing task branches is best handled by creating an isolated git worktree per task. This allows simultaneous branch work in separate directories, avoiding checkout conflicts and keeping work safely isolated until merge.

How does project auto-setup work inside a new git worktree?

Project auto-setup works by automatically running environment preparation and baseline tests inside the new git worktree. This validates the working state immediately after branch creation to ensure the isolated environment is ready.

Do I need to manually add the worktree directory to gitignore?

You do not need to manually add the worktree directory to gitignore. The worktree creation process includes directory discovery and gitignore verification to ensure the location is properly ignored from the main repository.

How do I clean up and merge a git worktree after finishing a task?

To clean up and merge a git worktree after finishing a task, follow the provided clear merge workflows for either auto-merge or manual review. Once the branch merges successfully, the isolated worktree directory can be safely removed.

When should I use a git worktree instead of a standard git branch?

You should use a git worktree instead of a standard git branch when starting feature work that requires safe isolation, automated project setup, and baseline test verification across multiple languages or projects without disrupting your main workspace.