using-git-worktrees

Create isolated Git worktrees for feature branches with safety verification.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/JDetmar/pulumi-webflow --skill using-git-worktrees-jdetmar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/JDetmar/pulumi-webflow/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/JDetmar/pulumi-webflow --skill using-git-worktrees-jdetmar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables safe, isolated feature work by creating and managing Git worktrees so developers can work on new branches without polluting the main workspace.

Core Features & Use Cases

  • Directory-focused isolation: selects a project-local (.worktrees) or global worktree directory based on a defined priority, or prompts when needed.
  • Safety-verification: ensures the chosen worktree is ignored by Git to prevent accidental commits of worktree contents.
  • Auto-setup flow: creates the worktree, checks out the new branch, and performs optional project setup and baseline verification.
  • Use case: start implementing a feature on a new branch while keeping the main branch pristine, then switch back when ready.

Quick Start

Set up an isolated git worktree for a new feature branch with safety checks and baseline verification.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I isolate feature work in a separate git worktree?

To isolate feature work, git worktrees create separate directory branches linked to your repository, allowing you to develop features independently without affecting or polluting your main workspace.

What is the best way to keep my main git branch pristine while developing a new feature?

Git worktrees keep your main branch pristine by creating an isolated directory for a new feature branch, preventing accidental changes to the main workspace while enabling safe baseline verification before implementation.

How do I set up a git worktree for a new branch?

Setting up a git worktree involves selecting a project-local or global directory, verifying the path is ignored by git for safety, creating the worktree, checking out the branch, and optionally running project setup tasks.

Do I need to verify git ignore rules before creating a worktree?

Yes, you must verify git ignore rules before creating a worktree to ensure the chosen directory is ignored, preventing accidental commits of worktree contents into your main repository.

Can I run project setup tasks automatically after creating a git worktree?

Yes, the worktree creation flow optionally runs project setup tasks and baseline verification automatically after checking out the new branch, ensuring your isolated feature environment is fully configured.

What happens if my worktree directory is not ignored by git?

If your worktree directory is not ignored by git, you risk accidental commits of worktree contents into the main repository, which is why safety verification of ignore rules is required before creation.