Home/Skills/meta/Using Git Worktrees

/using-git-worktrees

Using Git Worktrees

Isolated workspaces per feature. Safe directory selection, gitignore check, no accidental commits of worktree junk.

YouSystem-level skill used when building or editing Agent0 itself.

What it does

Creates a git worktree with deliberate safety: checks for existing `.worktrees/` or `worktrees/`, reads CLAUDE.md for a preference, asks the user only when neither is available. Verifies the directory is gitignored before creating anything, so worktree contents never sneak into a commit. Global-directory option when project-local isolation isn't wanted.

Use it when starting feature work that needs isolation from the current workspace, before executing an implementation plan that will touch many files, or when running parallel experiments that shouldn't stomp on each other. Don't use it for a one-file tweak. Overhead isn't worth it.

Outputs a ready-to-use worktree at a known path, with the right branch checked out and the directory verified gitignored. Pairs with `executing-plans` (the plan that often wants isolation), `subagent-driven-development` (the parallel workflow that benefits from worktrees), and `finishing-a-development-branch` (the cleanup step when the work is done).

Build your second brain

Run /using-git-worktrees with your agents.

This skill ships with Agent0 Starter, plus 82 others.

Cortex
Chief of Staff
Loom
Loom
Radar
Radar
Hippo
Hippocampus
Signal
Signal
Sentinel
Sentinel
Axon
Axon
Hey, I'm Cortex — Chief of Staff for the team. Ask me anything; I'll handle it or pull in Loom (writing), Radar (growth), Hippocampus (research), Signal (social), Sentinel (ops), or Axon (code review). What's on your mind?