LLM Wiki — Multi-Machine Ingest กับ Git
🇹🇭 ภาษาไทย
ถ้า ingest wiki จาก 2 เครื่องโดยให้แต่ละเครื่อง git pull ก่อนแล้วค่อย push — Obsidian ไม่รวน แต่อาจเกิด git merge conflict ที่ไฟล์กลางบางไฟล์
Obsidian ไม่ใช่ตัวปัญหา
Obsidian แค่อ่าน markdown files จาก disk — ไม่มี database ของตัวเอง ไม่มี lock ไม่มี sync engine ที่จะขัดกับ git ไฟล์ที่ Obsidian เขียนเองมีแค่ .obsidian/ (settings, plugins) ซึ่งไม่กระทบเนื้อหา wiki
ความเสี่ยงจริงอยู่ที่ git ครับ
ไฟล์ที่เสี่ยง conflict
ทุก ingest แตะไฟล์เหล่านี้เสมอ:
| ไฟล์ | เหตุผล |
|---|---|
wiki/index.md | เพิ่ม entry ใหม่ + อัปเดต stats ทุกครั้ง |
wiki/log.md | prepend log entry ทุกครั้ง |
wiki/overview.md | อัปเดตเมื่อ big picture เปลี่ยน |
ไฟล์ที่ ไม่เสี่ยง (ถ้า ingest ต่างกัน):
- Entity/concept pages ใหม่ที่แต่ละ ingest สร้าง — คนละไฟล์ ไม่ชน
Timeline ที่ทำให้ conflict
เครื่อง A เครื่อง B
─────────────────────────────────────────────
git pull ✅ git pull ✅
ingest source X ingest source Y
แก้ index.md, log.md แก้ index.md, log.md
git push ✅ (ขึ้นก่อน)
git push ❌ REJECTED
→ ต้อง git pull ก่อน
→ merge conflict ที่ index.md / log.md
conflict เกิดเฉพาะตอน timeline ซ้อนทับกัน — ถ้าไม่ได้ ingest พร้อมกัน ไม่มีปัญหา
วิธีป้องกัน
วิธีที่ 1 — Ingest ทีละเครื่อง (ง่ายสุด)
ถ้าใช้คนเดียวสองเครื่อง ไม่เปิดพร้อมกัน โอกาสเกิด conflict แทบเป็นศูนย์ เพียงแค่:
git pull → ingest → git push → ปิด
ก่อนเริ่มเครื่องที่สองค่อย pull ใหม่
วิธีที่ 2 — Branch แยกต่างหาก (robust กว่า)
เครื่อง A → branch: ingest/machine-a → merge ไป main
เครื่อง B → branch: ingest/machine-b → merge ไป main
conflict จัดการตอน merge แทน ไม่กระทบการทำงานของอีกเครื่อง
วิธีที่ 3 — Rebase เมื่อ push ถูก reject
ถ้าเกิด conflict แล้ว:
git pull --rebase origin main
# แก้ conflict ใน index.md / log.md
git add wiki/index.md wiki/log.md
git rebase --continue
git pushข้อมูลไม่หายแน่นอน — git เก็บทุก version ไว้
สรุปความเสี่ยง
| สิ่งที่จะเกิด | ระดับ | หมายเหตุ |
|---|---|---|
| Obsidian รวน | ❌ ไม่เกิด | แค่อ่าน markdown |
| git conflict บน index/log | ⚠️ เกิดได้ | เฉพาะตอน ingest พร้อมกัน |
| ข้อมูล wiki สูญหาย | ❌ ไม่เกิด | git เก็บทุก version เสมอ |
| เนื้อหา wiki ผิดพลาด | ⚠️ ถ้า resolve conflict ผิด | ตรวจสอบหลัง merge |
Related
- LLM Wiki Pattern — pattern ต้นฉบับ โดย Andrej Karpathy
- LLM Wiki Pattern กับ OpenClaw — ใช้ร่วมกันได้ไหม? — role split ระหว่างสองเครื่อง
🇬🇧 English
When ingesting wiki content from two machines — each doing git pull before pushing — Obsidian will not break. The real risk is git merge conflicts on shared files.
Obsidian Is Not the Problem
Obsidian simply reads markdown files from disk. It has no internal database, no file locks, and no sync engine that conflicts with git. The only files Obsidian writes itself are in .obsidian/ (settings, plugins) — these do not affect wiki content.
The real risk is git.
Files at Risk of Conflict
Every ingest touches these files:
| File | Reason |
|---|---|
wiki/index.md | New entry added + stats updated every ingest |
wiki/log.md | New log entry prepended every ingest |
wiki/overview.md | Updated when the big picture shifts |
Files that won’t conflict (if ingesting different sources):
- New entity/concept pages created per ingest — different files, no collision
The Conflict Timeline
Machine A Machine B
─────────────────────────────────────────────
git pull ✅ git pull ✅
ingest source X ingest source Y
edit index.md, log.md edit index.md, log.md
git push ✅ (pushes first)
git push ❌ REJECTED
→ must git pull first
→ merge conflict on index.md / log.md
Conflicts only occur when timelines overlap — if ingests don’t run simultaneously, no problem.
Prevention Strategies
Option 1 — Ingest One Machine at a Time (simplest)
If you’re the only user and don’t run both machines simultaneously, conflict probability is near zero:
git pull → ingest → git push → done
Before starting the second machine, pull again.
Option 2 — Separate Branches (more robust)
Machine A → branch: ingest/machine-a → merge to main
Machine B → branch: ingest/machine-b → merge to main
Conflicts are resolved at merge time, not during active work.
Option 3 — Rebase on Rejection
If a conflict already occurred:
git pull --rebase origin main
# resolve conflicts in index.md / log.md
git add wiki/index.md wiki/log.md
git rebase --continue
git pushNo data is ever lost — git preserves every version.
Risk Summary
| Scenario | Level | Notes |
|---|---|---|
| Obsidian breaks | ❌ Won’t happen | Just reads markdown |
| git conflict on index/log | ⚠️ Possible | Only when ingesting simultaneously |
| Wiki data lost | ❌ Won’t happen | git preserves all versions |
| Wiki content corrupted | ⚠️ If conflict resolved wrong | Review after merge |
Related
- LLM Wiki Pattern — original pattern by Andrej Karpathy
- LLM Wiki Pattern กับ OpenClaw — ใช้ร่วมกันได้ไหม? — role split between tools