Worktrees

Every session works in its own git worktree: a separate checkout of the repo on its own branch. Agents never share a working tree, so two of them can change the same repo at once, and your main checkout stays yours.

The Repos view's worktree table: every added worktree, its branch, agent, status and pull request

  • Worktrees go under ~/code/wt/<repo>/<name> (set root under [worktrees]).
  • The branch name comes from the prompt: see Branch names.
  • A cross-repo session gets a worktree in each repo, on the same branch name.
  • Worktrees made outside Heed can be imported as sessions.

Heed never removes a worktree with uncommitted changes or unpushed commits. See Removing and Cleanup.