using-git-worktrees

Create isolated git worktrees with directory priority and gitignore safety checks.

4|1|Updated Apr 4, 2024
One-click install
npx skills add https://github.com/maraxen/praxis --skill using-git-worktrees-maraxen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/maraxen/praxis/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/maraxen/praxis --skill using-git-worktrees-maraxen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate development work by creating and managing git worktrees so feature work can run concurrently without altering the main workspace.

Core Features & Use Cases

  • Priority-based directory selection (prefers .worktrees, then worktrees) to ensure a deterministic workspace location.
  • Automatic preference from CLAUDE.md when present, enabling user-specified directory choice without prompts.
  • Safety verification before creation, including gitignore checks to ensure worktrees are ignored locally and globally.
  • Guided creation workflow that detects the project name, sets the worktree path, and performs optional environment setup commands for common toolchains.
  • Suitable for feature development, experimental branches, and parallel bugfix work across multiple contexts while preserving a clean baseline.

Quick Start

Start by invoking the skill to set up an isolated git worktree for your current project, following the priority rules and safety checks.

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 development work using git worktrees?

Git worktrees isolate feature development by automatically creating separate working directories, verifying gitignore rules to ensure a clean baseline for concurrent branch work without altering the main workspace.

How does git worktree directory selection work automatically?

Git worktree directory selection follows priority rules, preferring .worktrees then worktrees directories, while automatically applying user-specified paths from CLAUDE.md to ensure deterministic workspace locations without prompts.

Do I need to update gitignore rules before creating a git worktree?

Yes, gitignore verification is required before creating a git worktree because the skill enforces safety checks to ensure worktree directories are ignored locally and globally, preventing accidental repository commits.

Can I run environment setup commands for different toolchains after creating a git worktree?

Yes, environment setup commands for common toolchains run after git worktree creation because the guided workflow detects the project name, sets the path, and performs optional cross-tool setup to establish a clean baseline.

What is the best way to manage parallel bugfix work across multiple git branches?

Using isolated git worktrees is the best way to manage parallel bugfix work across multiple branches, preserving a clean baseline and enabling concurrent development without the context switching overhead of a single workspace.

Why should I use git worktrees instead of switching branches in my main workspace?

Git worktrees prevent context switching in the main workspace by creating isolated directories for parallel work, ensuring experiments and feature development run concurrently while preserving a clean, reproducible baseline.