using-git-worktrees

Create isolated Git worktrees for feature branches with safety checks.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/GOODWORKRINKZ/mylamp --skill using-git-worktrees-goodworkrinkz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/GOODWORKRINKZ/mylamp/tree/main/.agents/skills/using-git-worktrees
Command: npx skills add https://github.com/GOODWORKRINKZ/mylamp --skill using-git-worktrees-goodworkrinkz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create isolated Git worktrees to enable feature work without disturbing the current workspace or main branch.

Core Features & Use Cases

  • Smart directory selection and priority: prefer existing local worktrees and respects project hints (CLAUDE.md) to determine where to place new worktrees.
  • Safety verification: ensures created worktrees are ignored by git to prevent accidental commits from local worktrees.
  • Flexible setup: automatically creates a worktree for a new branch, checks out, and prepares a clean baseline for development.

Quick Start

Create a new isolated git worktree for a feature branch and switch into it.

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 work?

Git worktrees isolate feature work from your current workspace by creating separate working directories for different branches. This allows experiments across branches without disturbing the main repository or switching branches in your primary directory.

How do I ensure git worktrees don't pollute the main repository?

You can prevent worktrees from polluting the main repository by enforcing safety checks that ensure created worktree directories are ignored by git. This isolation prevents accidental commits of local worktree files into the main branch.

How does directory selection work when creating a git worktree?

Directory selection for git worktrees prioritizes existing local worktrees and respects project hints like CLAUDE.md. This smart selection determines the optimal placement for new worktrees to maintain an organized workspace.

Can I run experiments across branches without disturbing my current workspace?

Yes, you can run experiments across branches without disturbing your current workspace by creating isolated git worktrees. The automated setup creates a worktree for a new branch, checks it out, and prepares a clean baseline for development.

What safety checks are needed when setting up git worktrees?

Safety checks for git worktrees verify that created worktree directories are ignored by git to prevent accidental commits. The automated setup also validates a clean baseline after creating the worktree and switching branches.