using-git-worktrees

Create isolated git worktrees for feature branches with gitignore verification.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/rapyuta-robotics/agent-ai --skill using-git-worktrees-rapyuta-robotics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/rapyuta-robotics/agent-ai/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/rapyuta-robotics/agent-ai --skill using-git-worktrees-rapyuta-robotics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams create isolated git worktrees to work on features without disturbing the main workspace, enabling safe parallel development and cleaner main branches.

Core Features & Use Cases

  • Directory selection: follows a priority to locate or propose a worktree directory (.worktrees, worktrees, CLAUDE.md), minimizing friction.
  • Safety verification: ensures the selected local worktree path is ignored by gitignore before creation to prevent accidental commits of worktree contents.
  • Auto-detection and setup: detects the current project name and automatically configures the new worktree path; runs project setup steps where applicable.
  • Workflow integration: pairs with related development skills to isolate work, then merge changes back into the main branch after validation.

Quick Start

Start by choosing a target worktree location, then create a new worktree for a feature branch, enter the new directory, and run project setup commands if required.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
Why use git worktrees for feature development instead of regular branching?

Git worktrees provide isolated directories for parallel feature development, reducing interference with your main workspace and maintaining cleaner branch histories without switching contexts in a single directory.

How do I create an isolated git worktree for a new feature branch?

To create a git worktree, select a target location following directory priorities like .worktrees or worktrees, create the worktree for your feature branch, enter the new directory, and run any required project setup commands.

Does git worktree creation check if the path is ignored by gitignore?

Yes, safety verification ensures the selected local worktree path is ignored by gitignore before creation, preventing accidental commits of worktree contents into your main branch history.

Can I use git worktrees for local projects to isolate feature work?

Yes, git worktrees apply to local projects and are particularly useful when starting feature work that requires isolation from the current workspace, enabling safe parallel development without disturbing files.

What's the best way to manage multiple git branches without workspace interference?

Using isolated git worktrees is the best way to manage multi-branch projects, as it detects your project name, auto-configures the worktree path, and keeps branch work separated in dedicated directories.

How do I merge changes from a git worktree back into the main branch?

After validating your feature work in the isolated git worktree, you pair with related development skills to merge changes back into the main branch, completing the safe parallel development workflow.