Read the full article here:
This document is the runnable appendix for the article. It keeps the repo-specific commands, inspection steps, and code pointers in one place without duplicating the essay.
git clone https://github.com/flyingrobots/git-cms.git
cd git-cms
npm run setup
npm run demo
npm run sandboxThen, in another terminal:
npm run sandbox:shellInside the sandbox shell, the live repo is at $GIT_CMS_REPO.
Run these:
git -C "$GIT_CMS_REPO" for-each-ref refs/_blog/
git -C "$GIT_CMS_REPO" log refs/_blog/dev/articles/hello-world -1 --format="%B"
git -C "$GIT_CMS_REPO" log refs/_blog/dev/articles/hello-world -1 --format="tree: %T"
git -C "$GIT_CMS_REPO" log refs/_blog/dev/articles/hello-world --graph --onelineWhat to notice:
- the article body lives in the commit message
- the commit points at the empty tree
published/hello-worldis behindarticles/hello-world- history is native Git ancestry, not a separate feature layer
The sandbox starts with an intentionally useful state:
hello-worldpublished at v1- draft v2 and v3 ahead of published
- enough history to make the draft/published split and append-only restore model visible immediately
That means the repo and UI are alive on first load. You do not have to create the interesting state by hand before the stunt becomes visible.
With npm run sandbox running:
- Open http://localhost:4638
- Load
hello-world - Compare the current draft with the published ref
- Open the History panel
- Preview an older version
- Try Restore and note that the UI blocks it while the article is published
- Unpublish, then restore, and watch a new draft commit appear
The important thing is that restore does not rewrite history. It appends a new commit using older content, but only once the article is no longer in the published state.
git-cms now has one deliberately narrow editorial feature layered on top of the core draft/publish model: review lanes.
- the live draft stays where it is
- a review lane stores speculative edits in a
git-warpworking set Apply Lanewrites those edits back as a new draft commit
That means a review lane is not a second truth. It is a pinned sidecar for proposed edits until you deliberately promote it.
If you want to read the implementation alongside the article, start here:
- src/lib/CmsService.js
saveSnapshot()for draft creationpublishArticle()for ref movementgetArticleHistory()andrestoreVersion()for version browsing and restorecreateReviewLane(),saveReviewLaneSnapshot(), andapplyReviewLane()for speculative editorial state
- src/server/index.js
- thin HTTP layer over
CmsService
- thin HTTP layer over
- scripts/prepare-playground.sh
- seeded sandbox bootstrap used for the article/demo path
This repo demonstrates a narrow architectural stunt, not a feature-complete CMS platform.
Good fit:
- single-author blogs
- docs sites
- low-write publishing systems
- Git-native operators who care about provenance and inspectability
Not the point:
- full editorial workflow platforms
- search and plugin ecosystems
- collaborative editing
- mainstream CMS feature parity
The new review lanes are intentionally small. They prove that git-warp can hold speculative editorial state cleanly, but they do not turn git-cms into a general collaborative CMS.