using-git-worktrees

Create and manage isolated git worktrees with submodule awareness.

Updated Nov 22, 2025
One-click install
npx skills add https://github.com/tom-xs/nixos-dotfiles --skill using-git-worktrees-tom-xs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/tom-xs/nixos-dotfiles/tree/main/ai/kimi-skills/skills/using-git-worktrees
Command: npx skills add https://github.com/tom-xs/nixos-dotfiles --skill using-git-worktrees-tom-xs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents workspace pollution and accidental commits by automating the creation of isolated git worktrees, ensuring your primary branch remains clean while you develop new features.

Core Features & Use Cases

  • Automated Isolation: Detects existing worktrees and submodules to prevent redundant setups.
  • Safety Guardrails: Automatically verifies that worktree directories are ignored in .gitignore to prevent accidental repository bloat.
  • Use Case: When starting a new feature, use this skill to create a dedicated, isolated directory that allows you to switch branches or test code without affecting your current environment.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for the current feature 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 isolate feature branches to keep my git workspace clean?

Git worktrees isolate feature branches by creating parallel working directories, allowing you to develop features safely without polluting your primary workspace or switching branches in your main directory.

What's the best way to manage git worktrees with submodules?

Managing git worktrees with submodules requires automated detection to prevent redundant setups. The process verifies repository state and initializes parallel directories while maintaining submodule awareness for safe isolation.

How do I prevent git worktree directories from bloating my repository?

To prevent git worktree bloat, automatically verify that worktree directories are added to .gitignore. This safety guardrail ensures isolated working directories are ignored and excluded from repository tracking.

Does git worktree automation work with existing branch isolation setups?

Git worktree automation works with existing setups by detecting current worktrees before creating new ones. This prevents redundant configurations and safely manages parallel directories without breaking your current environment.

When do I need to use git worktrees for feature development?

You need git worktrees when developing new features that require branch isolation. They allow you to test code and switch contexts without affecting your current environment, ensuring your primary branch remains clean.