From 57e3586292d2f7148f18f3b484d350960f56926b Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 5 Nov 2026 23:20:21 +0900 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=EB=AF=B8=EC=B6=9C=EC=8B=9C=20?= =?UTF-8?q?=EB=B2=94=EC=9C=84=EB=A5=BC=20=ED=95=9C=20=EB=B2=88=EC=97=90=20?= =?UTF-8?q?=EB=B0=9B=EB=8A=94=20=EB=AA=85=EB=A0=B9=EA=B3=BC=20=EA=B8=B0?= =?UTF-8?q?=EC=A4=80=EC=A0=90=20=EA=B8=B0=EB=A1=9D=EC=9D=84=20=EC=A0=81?= =?UTF-8?q?=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제 README "Updating a copied project"는 미출시 절을 한 범위로 받으라고 하면서 명령은 커밋 하나의 cherry-pick과 git diff뿐이다. 두 다운스트림이 실제로 쓰는 범위 merge(memento, 이력 공유)와 3-way 이식(tech-log, 이력 없음)은 없다. 기준점 기록도 .template-origin 하나만 적고, tech-log의 template.lock.json은 CHANGELOG에만 있다(0929/14-02 잔여). 고른 방법 - 범위를 받는 두 길을 명령과 함께 적었다: 이력을 공유하면 범위 브랜치를 `git merge --no-ff`, 아니면 범위 기준점을 base로 둔 3-way 병합 `git merge-recursive -- HEAD template/`(tech-log가 2026-09-29 동기화에 쓴 명령, 그 repo의 template-sync-2026-09-29.md). - 기준점은 .template-origin이나 제품의 lock 파일(tech-log의 template.lock.json sourceRevision)에 두고, 범위를 받은 뒤 범위 끝으로 옮긴다고 적었다. - 버린 대안: 동기화 스크립트를 템플릿에 두기. 두 제품의 방식이 달라 설계가 필요하다. 위험·한계 - 명령을 이 커밋에서 실행해 보지 않았다. 두 다운스트림이 지난 동기화에 쓴 명령을 옮겨 적었다(memento: git merge --no-ff, tech-log: git merge-recursive). 충돌 처리 안내는 없다. 검증 - desktop batch에서 확인: corepack pnpm verify:documentation Refs: 0929/14-02 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 81d6bd69..9358df6f 100644 --- a/README.md +++ b/README.md @@ -393,6 +393,20 @@ git log --oneline ..template/main # what changed since you copied git cherry-pick -x # one fix; -x records its origin ``` +Take an unreleased range as a whole. A repository that shares the template's +history merges the range's branch. One that does not (it started from a copy +of the files) merges three-way against the range base, which leaves the files +both sides changed as conflicts; resolve them and commit: + +```bash +git merge --no-ff template/ # shared history +git merge-recursive -- HEAD template/ # no shared history +``` + +Keep the base you synced from where your project records it: `.template-origin` +(below), or your own lock file (tech-log keeps it as `sourceRevision` in +`template.lock.json`). Move it to the range end once the range is in. + When the files have moved or diverged too far for a clean pick, read the change as a diff and apply it by hand: