ACE - Git Worktree

Task-aware git worktree management for isolated environments in one command. ACE Logo

Gem Version Ruby License: MIT

Works with: Claude Code, Codex CLI, OpenCode, Gemini CLI, pi-agent, and more.

Getting Started | Usage Guide | Handbook - Skills, Agents, Templates

ace-git-worktree demo

ace-git-worktree gives each task, PR, or branch its own workspace so you can move faster without carrying local state between changes. It handles naming, post-create hooks (commands run after worktree creation), cleanup, and navigation with configurable conventions across the team.

How It Works

  1. Create an isolated worktree from a task ID, PR number, or branch name with one command.
  2. Work inside the worktree with task metadata and status kept in sync automatically.
  3. Clean up stale worktrees when done, with path resolution for seamless cd navigation.

Use Cases

Start task work in an isolated environment - run ace-git-worktree with a task ID to create a linked worktree, update task status, and set up the branch. Use the as-git-worktree-create agent workflow for guided setup.

Review pull requests in dedicated directories - create a worktree from a PR number instead of switching branches in your main checkout, keeping review work cleanly separated.

Manage worktree lifecycle across a team - use the as-git-worktree-manage workflow with configurable naming, hooks, upstream push, and draft-PR automation to standardize workflows across the team.

Orchestrate parallel task work with ace-overseer - pair with ace-overseer to spin up worktrees per task, drive agents in parallel, and prune finished worktrees automatically.

Testing Contract

Run package tests with the restarted deterministic + scenario split:

ace-test ace-git-worktree
ace-test ace-git-worktree feat
ace-test ace-git-worktree all
ace-test-e2e ace-git-worktree
  • ace-test ace-git-worktree runs deterministic package tests (default fast group).
  • ace-test ace-git-worktree feat runs deterministic feature-level tests migrated from legacy integration-style coverage.
  • ace-test-e2e ace-git-worktree runs retained workflow scenarios only.

Getting Started | Usage Guide | Handbook - Skills, Agents, Templates | Part of ACE