Skip to content

branch-sync-showcase

branch

five local branches in five different upstream sync states (behind / ahead / diverged / synced / no-upstream); HEAD on the behind branch

A single repo with five local branches, each in a different sync
state relative to its `origin/` upstream:

  - `main` (CHECKED OUT) — 2 commits BEHIND `origin/main`. Drives
    "remote is ahead" surfacing in the history / status views.
  - `feat/ahead-only` — 3 commits AHEAD of `origin/feat/ahead-only`.
    Unpushed local work.
  - `feat/diverged` — 2 AHEAD + 2 BEHIND `origin/feat/diverged`.
    Needs pull --rebase / merge.
  - `feat/synced` — fully synced with its upstream. Neutral baseline.
  - `local-only` — NO UPSTREAM. Local-only branch.

Useful for testing:
  - Branches sidebar iconography across all sync states at once
  - History view "remote is ahead" affordance (HEAD is on the behind branch)
  - Per-branch pull / push hotkeys that act on the cursored branch
  - Branch list filtering / sorting with mixed-state input
  • main is checked out
  • main is 2 commits behind origin/main
  • feat/ahead-only is 3 commits ahead of origin/feat/ahead-only
  • feat/diverged is 2 ahead and 2 behind origin/feat/diverged
  • feat/synced is at the same commit as origin/feat/synced
  • local-only has no upstream configured
  • all four tracked branches have branch.<X>.remote = origin
  • worktree is clean
upstreamtrackingshowcaseremote
feat/ahead-onlyfeat/divergedfeat/syncedlocal-onlymain
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('branch-sync-showcase')
* f5f2e63 (local-only) wip: local-only experiment
| * a0d340e (feat/diverged) local: diverged 2
| * a3e16ed local: diverged 1
|/  
| * 9899a93 (feat/ahead-only) feat: ahead three
| * 1fb5f8e feat: ahead two
| * 9f3f5cc feat: ahead one
|/  
| * c7736d0 (origin/main) upstream: main 2
| * 867156f upstream: main 1
|/  
| * e334429 (origin/feat/synced, feat/synced) feat: synced-branch work
|/  
| * bd9cfd5 (origin/feat/diverged) upstream: diverged 2
| * 6a8b392 upstream: diverged 1
|/  
* 7443f6e (HEAD -> main, origin/feat/ahead-only) feat: shared baseline module
* 3657d81 chore: initial commit

Back to Scenario Browser