Problem
When work is split across several parallel stacks, there is no single
ref that combines them for local testing or preview. Developers
manually merge tips together to get an integrated view, then have to
redo it by hand every time any stack changes.
Proposal
Add an integration branch feature: a managed, throwaway ref that
merges a configured, ordered set of stack tips onto trunk. It is a
derived artifact — rebuilt from its configured tips on demand — giving
one combined branch for local testing without being load-bearing state.
Components:
- State model: repo-scoped integration info carrying the singleton
integration branch name, upstream branch, last-pushed hash (for
--force-with-lease leasing), and an ordered list of tips with the
hashes recorded at the last rebuild. Includes persistence of a paused
rebuild so a merge conflict can be resolved and resumed.
- Git helpers:
Merge, IsClean, and CheckoutNewBranch worktree
primitives needed to build the merged branch.
- Handler package: orchestration for rebuild/advance/clean and
conflict-resume logic.
- CLI: the
gs integration command tree.
- Hooks: auto-rebuild and auto-submit integration on relevant
operations.
- Conflict handling: regenerate conflicted derived files during the
rebuild merge rather than surfacing them as raw conflicts.
Tracked by
Problem
When work is split across several parallel stacks, there is no single
ref that combines them for local testing or preview. Developers
manually merge tips together to get an integrated view, then have to
redo it by hand every time any stack changes.
Proposal
Add an integration branch feature: a managed, throwaway ref that
merges a configured, ordered set of stack tips onto trunk. It is a
derived artifact — rebuilt from its configured tips on demand — giving
one combined branch for local testing without being load-bearing state.
Components:
integration branch name, upstream branch, last-pushed hash (for
--force-with-leaseleasing), and an ordered list of tips with thehashes recorded at the last rebuild. Includes persistence of a paused
rebuild so a merge conflict can be resolved and resumed.
Merge,IsClean, andCheckoutNewBranchworktreeprimitives needed to build the merged branch.
conflict-resume logic.
gs integrationcommand tree.operations.
rebuild merge rather than surfacing them as raw conflicts.
Tracked by
Merge,IsClean,CheckoutNewBranchgit helpersgs integrationcommand tree