using-git-worktrees

Create isolated git worktrees with new branches and verify clean baselines.

1|Updated Dec 25, 2017
One-click install
npx skills add https://github.com/mattniedelman/dotfiles --skill using-git-worktrees-mattniedelman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/mattniedelman/dotfiles/tree/main/dot_augment/skills/using-git-worktrees
Command: npx skills add https://github.com/mattniedelman/dotfiles --skill using-git-worktrees-mattniedelman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of isolated git worktrees to safely segregate feature development from the main workspace, reducing the risk of accidental changes to the active branch.

Core Features & Use Cases

  • Isolated feature worktrees: Create per-feature worktrees using a project-local (.worktrees) or global path, enabling parallel development without branch switching.
  • Safety verification: Ensure the selected directory is ignored by gitignore before creation to prevent accidental commits of worktree contents.
  • Auto-setup & verification: Detect project type and run setup steps (Node.js, Rust, Python, Go) to bring the new worktree to a ready baseline.
  • Use Case: When starting work on a new feature, spin up an isolated workspace and confirm a clean baseline before implementation.

Quick Start

Set up an isolated git worktree for a new feature branch in the current repository and verify a clean baseline.

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, you need to detect the project root, create a worktree with a new branch in a local or global path, and ensure the directory is ignored by git. This isolates feature work from your main workspace.

How do git worktrees keep my main workspace safe during branching?

Git worktrees keep your main workspace safe by segregating feature development into separate directories, reducing the risk of accidental changes to the active branch. This allows parallel development without constantly switching branches.

Can I automatically set up dependencies in a new git worktree?

Yes, you can automatically set up dependencies in a new git worktree. The process detects the project type and runs setup steps for common ecosystems like Node.js, Rust, Python, and Go to bring the worktree to a ready baseline.

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

The best way to manage multiple git branches without switching is using isolated git worktrees. This approach creates per-feature workspaces using project-local or global paths, enabling parallel development and verifying a clean baseline before implementation.

Why does my git worktree directory need to be ignored by gitignore?

Your git worktree directory needs to be ignored by gitignore to enforce safety checks that prevent accidental commits of the worktree contents. This verification ensures the selected directory remains separate from the main repository tracking.

Does setting up isolated worktrees work with Python and Rust projects?

Yes, setting up isolated worktrees works with Python and Rust projects. The auto-setup process detects these ecosystems, along with Node.js and Go, running the necessary steps to verify a clean baseline and report readiness for implementation.