Keep your notes in the repo

This garden is a few hundred markdown files committed to a repository and rendered into a static site. Every so often I ask whether the notes should live in a database instead. The answer keeps coming back no, and the reasons are worth writing down.

What the repo gives you

What a database would cost

When a database is right

The pattern

Source of truth in plain files under version control. Derived indexes wherever they earn their place. Never the other way round.

Limits

This holds for a few hundred notes written by one person. Very large corpora, many authors, or content that must change without a deploy shift the trade-off.

Related: Atomic Notes on how the notes themselves are shaped, and Audit retrieval before trusting an answer on checking what an index actually contains.

All notes