How-To Series · Episode 12 / 59 · Module 2: Daily Driver

Hermes · Git Worktrees

Multiple agents on the same repo. Zero stepping on each other.

After this videoYou can now run two agents in parallel against the same repo, cleanly isolated.

Two Hermes agents in one checkout will fight over files. Git worktrees give each one its own isolated working directory backed by the same repo. hermes -w is the one-flag shortcut: it creates a disposable worktree under .worktrees/, checks out a fresh branch, and runs the whole session inside it. Open two terminals, run hermes -w in each, and you have two parallel agents with their own /rollback histories. Cleanup is git worktree remove.

About these resources. Every command in this video comes from the Git Worktrees user-guide doc. The Checkpoints & rollback doc is cited for the per-worktree shadow-repo checkpoint history details.

Sources · What this video distills

2 docs pages · every command below traces to one of them
Primary · git worktree add, hermes -w, parallel agents, per-worktree /rollback, cleanup
Git Worktrees
Read ↗
How the per-worktree shadow-repo checkpoint history actually works
Checkpoints & /rollback
Read ↗

Commands shown · Copy and paste

each shows the source doc it came from
Manual worktree creationfrom Git Worktrees ↗
git worktree add ../repo-feature feature/hermes-experiment
Hermes one-flag shortcutfrom Git Worktrees ↗
hermes -w
One-shot inside a fresh worktreefrom Git Worktrees ↗
hermes -w -q "Fix issue #123"
Cleanup · drop the worktreefrom Git Worktrees ↗
git worktree remove ../repo-feature

Going deeper · Related Hermes docs

further reading · not sources of facts shown above

Next in the series · Episodes that build on this

E10
Profiles · Running Multiple Agents
E45
/rollback & checkpoints
E47
Kanban worker lanes