Using Git Worktrees

SkillFiles & storage

Creates and manages isolated Git worktrees for parallel agents, risky experiments, or long-running feature work while preserving the user's current checkout. Use before concurrent branch edits or when isolation makes rollback safer. Not for a trivial one-file change that is already isolated.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Using Git Worktrees skill

What this skill tells your AI

The instructions your AI receives, as published by thiientv/godmode in skills/using-git-worktrees/SKILL.md and read by ahel’s review.

Isolation is a safety boundary, not a way to hide unreviewed changes.

Before creating one

  1. Inspect git status, current branch, repository root, and existing worktrees.
  2. Preserve uncommitted user work; never reset, checkout, or clean it away.
  3. Choose an explicit branch name and a worktree path outside the main working tree when practical.
  4. Confirm the base ref and whether ignored/generated files are needed.

Create safely

git worktree list
git worktree add ../<repo>-<task> -b <task-branch> <base-ref>

Run repository setup in the new worktree, record the exact base commit, and keep secrets and local environment files out of the branch. Do not use the same worktree for two writers.

Finish or discard

  • Review and test the branch before integrating it.
  • Merge or cherry-pick only the intended commits after checking the diff.
  • Remove a disposable worktree only after confirming its commits and needed artifacts are preserved:
git worktree remove ../<repo>-<task>
git worktree prune

Do not force removal when it contains unreviewed work. If a worktree is stale, inspect its branch and status before deciding whether it is recoverable.

Completion condition

The branch's base, ownership, integration path, and cleanup decision are explicit; the main checkout remains intact.

Signals

GitHub stars
94
Forks
77
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
using-git-worktrees-thiientv
Source
github.com/thiientv/godmode