Correct README sync instructions (root merge, not subtree --prefix)

This commit is contained in:
terminar committed 2026-08-29 00:28:22 +02:00
1 parent d722592379
commit e712ce14fa
1 file changed
+28 -15
+28 -15
View File
@@ -9,30 +9,43 @@ see `layout.go` for the API (`PageHeader`, `NavItem`, `NewRenderer`,
## Source of truth ## Source of truth
This repo is the **source of truth** for the shared layout. It is mirrored This repo is the **source of truth** for the shared layout. `yak/yak-webui-template`
into the other two meta-repos as `yak-webui-template` and and `yamase/yamase-webui-template` are git-history mirrors of it (each repo's
`yamase-webui-template`, each of which pulls this repo in via `git root mirrors this repo's root — not a subdirectory — created via `git merge
subtree` so layout/CSS changes can be synchronized without duplicating --allow-unrelated-histories`, so the histories are related and can be
design work. Make layout changes *here first*, then push them out — never re-merged incrementally). Each mirror has exactly one intentional local
edit the mirrored copies directly. 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 From inside `yak-webui-template` or `yamase-webui-template` (each already
subtree remote — see below): has a `source` remote pointing back here):
```sh ```sh
git subtree pull --prefix=yak-webui-template webui-template-origin main --squash git fetch source main
# resolve/verify, then: 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 git push origin main
``` ```
### One-time subtree setup (already done for yak/yamase, kept here for ### One-time mirror setup (already done, kept here for reference/re-setup)
reference/re-setup)
```sh ```sh
git remote add webui-template-origin https://teruna.dev/yetano/yetano-webui-template.git git init -b main
git subtree add --prefix=yak-webui-template webui-template-origin main --squash 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/<org>/<org>-webui-template
git remote add origin git@teruna.dev:<org>/<org>-webui-template.git
git push -u origin main
``` ```
## What's shared vs. what stays per-project ## What's shared vs. what stays per-project