using-git-worktrees

Creates isolated Git worktrees with .gitignore safety and automated setup.

1|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/pascallammers/mylo-travel-concierge-v2 --skill using-git-worktrees-pascallammers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/pascallammers/mylo-travel-concierge-v2/tree/main/.factory/skills/using-git-worktrees
Command: npx skills add https://github.com/pascallammers/mylo-travel-concierge-v2 --skill using-git-worktrees-pascallammers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating isolated development environments using Git worktrees, ensuring a clean separation between different branches and features.

Core Features & Use Cases

  • Isolated Workspaces: Create separate directories for each feature branch, sharing the same repository.
  • Smart Directory Selection: Prioritizes .worktrees/ and worktrees/ directories, with fallback to user prompts or CLAUDE.md preferences.
  • Safety Verification: Automatically checks and updates .gitignore for project-local worktrees to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (npm, cargo, pip, poetry, go).
  • Baseline Verification: Runs project tests to ensure a clean starting state.
  • Use Case: Before starting work on a new authentication feature, use this Skill to create a dedicated, isolated worktree, ensuring your main development branch remains untouched and stable.

Quick Start

Use the using-git-worktrees skill to create a new worktree for the 'feature/user-profile' branch.

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

To create an isolated Git worktree, this Skill intelligently selects a directory location, typically prioritizing `.worktrees/` or `worktrees/`, and sets up a clean branch. It ensures your main development branch remains untouched and stable while you implement new features.

What is the best way to manage multiple Git branches without affecting my main directory?

Using Git worktrees is an effective way to manage multiple branches, as it creates separate directories for each feature branch sharing the same repository. This approach ensures clean separation between different branches and features without interfering with your main directory.

Does this Git worktree setup support my project's dependency manager?

Yes, the worktree setup supports multiple dependency managers by detecting and automatically running project-specific setup commands for npm, cargo, pip, poetry, and go. This ensures your isolated workspace has all required dependencies installed correctly.

How can I prevent my project-local Git worktrees from being accidentally committed?

To prevent accidental commits of project-local worktrees, this Skill performs safety verification by automatically checking and updating your `.gitignore` file. This ensures the worktree directories are properly ignored by Git version control.

Can I run a baseline test suite automatically after setting up a Git worktree?

Yes, you can run a baseline test suite automatically. After creating the worktree and installing dependencies, the Skill executes project tests to verify a clean starting state, ensuring your isolated development environment is fully functional before you begin coding.

Where should I store my Git worktrees to keep my repository clean?

You should store Git worktrees in dedicated directories to keep your repository clean. This Skill smartly prioritizes `.worktrees/` and `worktrees/` directories, with fallback to user prompts or `CLAUDE.md` preferences for optimal project organization.