Keeping Worktrees in Sync — Managing Divergence
Rebasing worktrees, handling divergence, and merge strategies that keep multi-agent integration smooth
You've got three worktrees running. Agent 1 just merged its payments feature into main. Now Agent 2's search branch and Agent 3's notifications branch are based on an older version of main — they don't have the payments code.
This is divergence, and it's the most common source of pain in multi-agent development. The longer your feature branches diverge from main, the harder integration becomes. Small divergences mean small conflicts. Large divergences mean large headaches.
Keeping worktrees in sync is about managing this divergence proactively, so integration stays simple.
Understanding the Divergence Problem
When you create a worktree from main, your branch starts at the same commit as main. As both your branch and main move forward, they diverge:
main: This lesson is part of the Guild Member curriculum. Plans start at $29/mo.
