using-git-worktrees

- Systematic selection - Follow priority: existing dir > CLAUDE.md > ask user

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "using-git-worktrees" with this command: npx skills add reinamaccredy/maestro/reinamaccredy-maestro-using-git-worktrees

Using Git Worktrees

Core Principles

  • Systematic selection - Follow priority: existing dir > CLAUDE.md > ask user

  • Safety first - Always verify .gitignore for project-local worktrees

  • Clean baseline - Run tests before starting work

Announce: "I'm using the using-git-worktrees skill to set up an isolated workspace."

Quick Reference

Situation Action

.worktrees/ exists Use it (verify .gitignore)

worktrees/ exists Use it (verify .gitignore)

Both exist Use .worktrees/

Neither exists Check CLAUDE.md → Ask user

Not in .gitignore Add immediately + commit

Tests fail Report failures + ask before proceeding

Basic Workflow

Check existing

ls -d .worktrees worktrees 2>/dev/null

Verify gitignore (project-local only)

grep -q "^.worktrees/$" .gitignore

Create

git worktree add .worktrees/$BRANCH -b $BRANCH cd .worktrees/$BRANCH

Setup + verify

npm install # or cargo build, pip install, etc. npm test # must pass before starting

Anti-Patterns

  • ❌ Skipping .gitignore - Worktree contents pollute git status

  • ❌ Assuming location - Always follow priority order

  • ❌ Ignoring test failures - Can't distinguish new vs pre-existing bugs

  • ❌ Hardcoding setup - Auto-detect from package.json, Cargo.toml, etc.

References

  • Creation Steps - Full setup process with examples

  • Safety Verification - .gitignore checks and directory selection

Related

  • conductor - Design approval triggers worktree creation

  • finishing-a-development-branch - Cleanup after work complete

  • maestro-core - Plugin coordination context

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

conductor

No summary provided by upstream source.

Repository SourceNeeds Review
General

maestro-revert

No summary provided by upstream source.

Repository SourceNeeds Review
General

maestro-new-track

No summary provided by upstream source.

Repository SourceNeeds Review
General

init

No summary provided by upstream source.

Repository SourceNeeds Review