Try it in a sandbox
To try git-splice without touching your own repositories, run this in a
clone of git-splice:
nix develop # a shell with the dev tools and this checkout on PATH
just walkthrough
Without Nix, install git-splice first, then run
test/walkthrough/setup.sh in the clone.
It builds a throwaway monorepo in a temporary directory and opens a shell in it. The walkthrough shows what to type there, and each of its pages starts from a fresh sandbox.
What you get:
$WALKTHROUGH/monorepo: the monorepo, onmain. You start here.$WALKTHROUGH/upstream/pkg-a.git,pkg-b.gitandlib-c.git: bare repositories on the same machine that stand in for the splices' upstreams. The monorepo reaches them ashttps://git.example.com/<name>.git: itsurl.<base>.insteadOfmaps that prefix to$WALKTHROUGH/upstream/. The sandbox's shell exports$WALKTHROUGH, so you can paste the walkthrough's commands as they are.vendor/pkg-a/: a splice whose upstream has one commit the monorepo doesn't have yet. It's already fetched.pkg-b.git: a repository that isn't spliced in yet.libs/c/: a folder of the monorepo, to be published to the emptylib-c.git.
To push a commit to an upstream as if someone else had, clone it next to the monorepo, commit there and push, as in the walkthrough's fetch. The sandbox's shell names you "Walkthrough" for such commits, and otherwise uses your git config.
The output is real
No output in these docs is pasted in.
scrut runs every command
on the walkthrough, concept, scenario and comparison pages and compares
what it prints, so the output is what the current version prints.
just docs-check runs them all, in CI too, and
just docs-check --write updates the pages after an intended change.
Each page starts with a block that GitHub doesn't render. It sources a
setup script, here scrut-setup.sh,
which builds the repositories, fixes the commit dates and ignores your
git config, so commit hashes are the same on every run.