using-git-worktrees

Create and manage isolated git worktrees with safety checks and baseline testing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of setting up isolated git worktrees, preventing accidental inclusion of worktree files in main repositories and ensuring safe directory management.

Core Features & Use Cases

  • Directory Selection & Priority: Chooses existing worktrees or asks user when none are found.
  • Safety Verification: Ensures worktree directories are ignored before creation, adding to .gitignore if necessary.
  • Project Initialization: Detects project type, installs dependencies, and runs tests to verify a clean baseline before use.

Quick Start

Use this Skill to create an isolated worktree for a new feature branch, verify dependencies, and run tests to ensure readiness before starting development.

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 a git worktree without accidentally tracking its files in the main repository?

To create a git worktree safely, you must verify the target directory is listed in .gitignore. This skill automates that safety check, adding the directory to .gitignore if necessary before creating the worktree to prevent accidental file inclusion.

What is the best way to set up an isolated development environment using git worktrees?

The best way to set up isolated git worktrees is to automate directory selection, verify ignore rules, and install dependencies. This skill initializes the project, installs necessary packages, and runs tests to verify a clean baseline before development.

Does this git worktree automation run tests before switching to a new feature branch?

Yes, this git worktree automation runs baseline tests after creating the isolated environment and installing dependencies. This verifies a clean state and ensures the new worktree is fully ready before you start feature development.

How do I manage multiple git worktrees when I already have existing ones?

When managing multiple git worktrees, this skill selects from existing directories by priority. If no existing worktrees are found, it prompts you to specify a new location, ensuring safe and organized repository management.

Why do my git worktree files keep showing up as untracked changes in my main repository?

Git worktree files show up as untracked changes if the directory is not ignored. This skill solves the problem by verifying .gitignore entries before creation and adding the path automatically if it is missing.