# Stacked changesets without branches: server-side restacking and CI check reuse

> Source: <https://gitslice.io/blogs/stacked-changesets>
> Published: 2026-11-30 00:46:28+00:00

**Key takeaway:** Gitslice stacks each new changeset on the active draft's current patchset via `gs create` and restacks dependents server-side in one topological pass after `gs modify`, so pure restacks reuse passing CI checks instead of re-running them.

# Stacked changesets without branches: server-side restacking, instant reorders, and zero wasted CI

Break large features into small, reviewable changesets that stack natively on the server — with one-command reorders, guided bottom-up conflict resolution, automatic child promotion as layers land, and cryptographic check reuse so pure restacks never re-run passing CI.

- changesets
- feature
- agents

Large changes are hard to review, risky to land, and painful to untangle when a test breaks. Breaking a feature into a stack of small, dependent changes — schema first, backend logic second, CLI or UI third — fixes review size, and coding agents make stacking even more natural because an agent can draft three clean, focused layers in minutes.

The catch in traditional Git workflows is that stacks are simulated on top of mutable branches. Reordering two layers means interactive rebases and force-pushes across every branch above them. Merging the bottom pull request leaves child PRs pointing at a dead base or triggers a storm of redundant CI runs across code whose final tree did not change by a single byte.

Gitslice treats **stacked changesets** as a native server primitive — no branches to name, no force-pushes, one-command reorders, guided bottom-up conflict resolution, and automatic CI check reuse when bottom layers land.

## [#](#stacking-without-branches)1. Stacking without branches

In Gitslice, every workspace is bound to a [slice](https://gitslice.io/doc/concepts) rather than a local branch. When you run `gs create` while a draft changeset is active, the new changeset automatically stacks on top of the active changeset's current patchset:

``` php
flowchart LR
  M["main (trunk)"] --> C1["1. Billing schema (ps1)"]
  C1 --> C2["2. Invoice service (ps1)"]
  C2 --> C3["3. Billing CLI (ps1)"]
```

Each layer is its own changeset with its own review page, immutable patchset history, [CI checks](https://gitslice.io/doc/checks), and approvals. You never invent branch names like `feat/billing-part-2-v3` or juggle `git stash` when switching layers:

If you want to start an unrelated change in the same workspace without stacking on your current draft, pass `gs create --root`. To branch a parallel approach off the same parent layer, pass `gs create --sibling`. Both eager checkouts (` gs init`) and on-demand [lazy workspaces](https://gitslice.io/doc/lazy) (` gs init --lazy`) switch layers cleanly without re-cloning.

## [#](#reorder-swap-and-split-in-a-single-restack)2. Reorder, swap, and split in a single restack

Stack shapes rarely stay frozen after the first draft. Maybe a reviewer asks to land a refactor before the API change, or you realize a helper belongs in its own changeset underneath your active layer.

Gitslice restructures stacks on the server in one topological pass — updating all dependency links first and running a single restack from the lowest affected changeset upward, so intermediate states never mint throwaway patchsets or trigger duplicate CI runs:

Whenever you edit an earlier layer in place with `gs modify`, Gitslice uploads the new patchset and automatically restacks every dependent changeset above it using three-way line merge and any folder merge rules in `.gitslice/merge.yaml`.

## [#](#guided-bottom-up-conflict-resolution)3. Guided bottom-up conflict resolution

In a five-changeset stack, an overlapping edit in layer 1 used to mean watching conflict markers cascade noisily into layers 2, 3, 4, and 5 all at once.

Gitslice now stops restacking each branch at the **first conflicted changeset** from the bottom up, leaving higher layers untouched until their base is clean:

Your workspace automatically switches to the conflicted changeset and writes standard conflict markers into the affected files. Fix the file, save it, and continue:

`gs restack --continue` (also available as `gs update-dependents --continue`) verifies that no `<<<<<<<` / `=======` / `>>>>>>>` markers remain, uploads the resolved patchset, and resumes restacking the remaining layers above it — either finishing with `restack complete` or stopping cleanly at the next conflict.

## [#](#landing-stacks-with-zero-wasted-ci)4. Landing stacks with zero wasted CI

Two things make landing stacks painful in branch-based tools: orphaned child PRs when only part of a stack lands, and paying full CI runtime all over again for every child layer after its parent merges. Gitslice eliminates both:

- **Automatic child promotion on partial landings.** When layer 1 lands (from the CLI, the web UI, or another workspace), open children automatically advance onto the landed commit. Running`gs sync` in your workspace moves you straight onto layer 2 at the new base — no manual detaching or branch surgery required.
- **One-command path submit.** Running`gs submit` on layer 3 validates and lands layers 1, 2, and 3 in base-to-tip order. As each ancestor publishes, remaining layers automatically promote onto the new commit and continue landing without mid-stack stale-base errors.
- **Cryptographic CI check reuse.** Every patchset records the cryptographic hash of the entire resulting repository tree. When layer 1 lands on`refs/global/main` and layer 2 restacks onto that commit without any other interleaved changes, layer 2's resulting tree is byte-for-byte identical to the tree CI already tested. Gitslice carries forward passing check results automatically and skips re-running CI — while never reusing failed or canceled runs so retries always execute fresh.
- **Live check progress & instant fast-fail.** When checks do need to run,`gs submit` (and`gs create --submit` /`gs modify --submit` ) streams check transitions, durations, and`passed/total` counts to`stderr` , aborts immediately if any required slice or`.gitslice/checks.yaml` check fails, and prints the failing run ID and last 30 log lines inline.

## [#](#how-gitslice-compares-to-other-stack-tools)5. How Gitslice compares to other stack tools

Stacked diffs pioneered at Google (Critique/Piper and **Gerrit**) and Meta (Phabricator and **Sapling**) have inspired an active ecosystem of tools for Git and GitHub. Each takes a distinct architectural trade-off:

| Tool | Where stacks live | Reorder & restack | What happens when layer 1 lands | Scope & workspace model | 
|---|---|---|---|---|
| **GitHub (chained PRs)** | Chained Git branches on GitHub | Manual branch rebases / UI update | Retargets child PR branch; triggers full PR CI again | Full Git repository | 
| **Graphite (`gt`)** | Local Git branches synced to GitHub PRs | `gt reorder` /`gt restack` + force-push | Stack-aware cloud merge queue or branch retarget + CI rerun | Full Git repository | 
| **Jujutsu (`jj`)** | Local change-ID DAG (Git-backed) | Automatic local descendant rebase; first-class conflicts | Push updated branches to remote forge; forge re-runs CI | Full local repository | 
| **Sapling (`sl`)** | Smartlog commit DAG | Automatic local restack + `sl pr submit --stack` | Syncs stacked PRs or lands via Meta-style review | Sapling clone / sparse profiles | 
| **GitButler** | Virtual branches in one local working tree | Drag-and-drop / CLI reorder in local client | Pushes standard branches to GitHub/GitLab | Full local Git clone | 
| **Gerrit** | Independent commits linked by `Change-Id` footer | Local `git rebase -i` +`git push HEAD:refs/for/main` | Server submission queue rebases series | Full Git repository | 
| **Gitslice (`gs`)** | Server-native changeset graph on a single trunk | Server-side `gs reorder` ,`gs move` ,`gs restack --continue` | Auto-promotes children & reuses passing CI on identical trees | Per-slice checkouts, [lazy FUSE mounts](https://gitslice.io/doc/lazy) , or zero-checkout MCP | 

If your team's source of truth is GitHub pull requests, **Graphite**, **GitButler**, **Jujutsu**, and **chained GitHub PRs** are great ways to tame multi-branch reviews on top of Git.

Gitslice builds stacking into the storage and CI model itself for teams and agent fleets working on a shared codebase:

1. **No branch explosion or force-push races.** Stacks are first-class changesets targeting`refs/global/main` , with every revision preserved as an immutable patchset rather than overwritten by force-pushes.
2. **Server-side restacking plus per-path concurrency.** Stacks compose naturally with`--merge-on-submit` and per-path admission, so dozens of agents and engineers can land independent stacks on the same slice without serializing behind one global merge queue.
3. **Tree-identical CI reuse.** Landing a 4-changeset stack whose checks already passed does not burn 3x extra CI runner minutes re-testing identical trees as each bottom layer merges.
4. **Sized to the task, with Git at the boundary.** Stack changes inside a focused[slice](https://gitslice.io/doc/concepts) or 2-second[lazy mount](https://gitslice.io/doc/lazy) , inspect everything with`--json` and`gs schema` , and still mirror every landed commit automatically to GitHub via[Git Mirrors](https://gitslice.io/doc/mirrors) .

## [#](#try-it-today)6. Try it today

Stacked changesets are built into every Gitslice workspace — no plugins, branch naming conventions, or extra setup needed:

Read the [Concepts guide](https://gitslice.io/doc/concepts), [CI Checks docs](https://gitslice.io/doc/checks), and [CLI Reference](https://gitslice.io/doc/cli) for every command and flag, or send ideas and friction straight to us with `gs feedback`.
