Clarify: repos cloned to study or port go straight into .reference/

This commit is contained in:
2026-10-25 11:08:54 +08:00
parent 43112dc0e9
commit afdb37e74a
+5
View File
@@ -70,6 +70,11 @@ printf '*\n' > ~/Git/<repo>/.reference/.gitignore
- The `.gitignore` **inside** `.reference/` contains a single `*`. Ignore the - The `.gitignore` **inside** `.reference/` contains a single `*`. Ignore the
whole folder there, not in the repo's root `.gitignore`: the folder is then whole folder there, not in the repo's root `.gitignore`: the folder is then
self-contained and stays untracked even if the root ignore file is rewritten. self-contained and stays untracked even if the root ignore file is rewritten.
- **Any repo cloned to study, port, or compare against is reference material.**
When asked to "check out this repo" (e.g. to reimplement it in another
language), create `.reference/` and its `.gitignore` as the very first step
and clone straight into it — never into the working root, even when the
project is not a git repo yet.
- Clone reference repos inside it: - Clone reference repos inside it:
`git clone --depth 1 <url> .reference/<name>`. Do not vendor them into `git clone --depth 1 <url> .reference/<name>`. Do not vendor them into
`Sources/` or `vendor/`. `Sources/` or `vendor/`.