using-git-worktrees

Create isolated git worktrees on new branches with safety checks.

1|1|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/BumpyClock/dotfiles --skill using-git-worktrees-bumpyclock
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/BumpyClock/dotfiles/tree/main/.ai_agents/skills/git-work-trees
Command: npx skills add https://github.com/BumpyClock/dotfiles --skill using-git-worktrees-bumpyclock

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees enable isolated workspaces for feature development, preventing changes in the main workspace and allowing parallel work on multiple branches.

Core Features & Use Cases

  • Isolate feature work by creating project-local or global worktrees that share the same repository.
  • Smart directory selection & safety checks to ensure worktrees are placed in ignored locations and do not risk committing worktree contents.
  • Automatic setup flow including detecting the project name, creating the worktree on a new branch, and applying project-specific setup scripts when present.

Quick Start

Create an isolated git worktree for the current project following the priority rules and safety verifications outlined above.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I use git worktrees to isolate feature development without disrupting my main workspace?

Git worktrees create isolated workspaces sharing the same repository to prevent main workspace disruption. This Skill automates worktree creation on a new branch, applying safety checks to ensure clean baselines and ignored directory placement for parallel branch work.

What is the best way to manage multiple git branches in parallel without switching contexts?

Using git worktrees is the best way to manage parallel branches without context switching. The Skill isolates work by creating project-local or global worktrees, automatically detecting the project name and applying project-specific setup scripts when present.

How does the worktree creation process handle project-specific setup and branch naming?

The worktree creation process detects the project name automatically, creates the worktree on a new branch, and runs optional project-specific setup scripts. It follows a defined priority order for worktree placement to ensure environments are isolated correctly.

Does the worktree creation process include safety checks for ignored directories?

Yes, the worktree creation process includes safety checks to ensure worktrees are placed in ignored locations. This prevents the risk of accidentally committing worktree contents to the main repository and verifies clean baselines before starting feature work.

When should I not use git worktrees for branch management?

You should not use git worktrees when your project lacks ignored directories for safe placement, as the safety checks require clean baselines. If your project cannot support isolated environments or lacks defined priority paths, worktree creation may fail.