From e712ce14fa8334ec2fd968d7b68a45cbc95e81aa Mon Sep 17 00:00:00 2001 From: Bjoern Kalkbrenner Date: Sat, 29 Aug 2026 00:28:22 +0200 Subject: [PATCH] Correct README sync instructions (root merge, not subtree --prefix) --- README.md | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index be951b7..113d961 100644 --- a/README.md +++ b/README.md @@ -9,30 +9,43 @@ see `layout.go` for the API (`PageHeader`, `NavItem`, `NewRenderer`, ## Source of truth -This repo is the **source of truth** for the shared layout. It is mirrored -into the other two meta-repos as `yak-webui-template` and -`yamase-webui-template`, each of which pulls this repo in via `git -subtree` so layout/CSS changes can be synchronized without duplicating -design work. Make layout changes *here first*, then push them out — never -edit the mirrored copies directly. +This repo is the **source of truth** for the shared layout. `yak/yak-webui-template` +and `yamase/yamase-webui-template` are git-history mirrors of it (each repo's +root mirrors this repo's root — not a subdirectory — created via `git merge +--allow-unrelated-histories`, so the histories are related and can be +re-merged incrementally). Each mirror has exactly one intentional local +difference: its `go.mod` `module` line, which names that repo's own import +path instead of this one. Make layout changes *here first*, tag a new +version, then pull the change into each mirror — never edit the mirrored +copies directly. -### Pushing a change out to the mirrors +### Pulling a change into a mirror -From inside `yak` or `yamase` (which already have this repo added as a -subtree remote — see below): +From inside `yak-webui-template` or `yamase-webui-template` (each already +has a `source` remote pointing back here): ```sh -git subtree pull --prefix=yak-webui-template webui-template-origin main --squash -# resolve/verify, then: +git fetch source main +git merge source/main +# resolve the go.mod conflict: keep the mirror's own module line, take +# everything else from source +git checkout --ours go.mod # if go.mod conflicted +git add go.mod +git commit +go test ./... git push origin main ``` -### One-time subtree setup (already done for yak/yamase, kept here for -reference/re-setup) +### One-time mirror setup (already done, kept here for reference/re-setup) ```sh -git remote add webui-template-origin https://teruna.dev/yetano/yetano-webui-template.git -git subtree add --prefix=yak-webui-template webui-template-origin main --squash +git init -b main +git remote add source git@teruna.dev:yetano/yetano-webui-template.git +git fetch source main +git merge --allow-unrelated-histories -m "Initial mirror of yetano-webui-template" source/main +go mod edit -module teruna.dev//-webui-template +git remote add origin git@teruna.dev:/-webui-template.git +git push -u origin main ``` ## What's shared vs. what stays per-project