Why git is the perfect vault backend
Databases need backups you'll forget to make. Sync services need subscriptions and trust. Git needs neither: every save is a commit, every commit is history, every push is an off-site backup. And in the agent era it earns its keep twice over — when agents write into your vault, git makes every write diffable, attributable, and revertible. An agent's bad day is a git revert, not a tragedy.
Setup
cd ~/Vault
git init
printf '.DS_Store\n.mdeditor/\n' > .gitignore
git add -A && git commit -m "vault: day one"
gh repo create my-vault --private --source=. --push
That's it. A private GitHub repo is free with unlimited history. From then on, commit as often as you like — or automate it.
Sync and automation
- note.md integration: the Sync-to-Vault plugin copies files into your git-synced vault with date-prefixed names and conflict-aware refresh; recent-file history mirrors across devices through the vault.
- Auto-commit: a cron line or launchd job running
git add -A && git commit -m "auto" && git pushevery hour gives you effortless continuous backup. - Multi-device: clone the repo on a second Mac; pull before writing, push after. Conflicts in outlines are rare (small files) and git shows exactly what happened when they occur.
- Agents: give agents a working copy. Review their commits like you'd review a colleague's PR — because that's what they are now.
FAQ
Is a private GitHub repo really free?
Yes — unlimited private repositories with full history on GitHub's free plan. A text vault of decades fits in megabytes.
What about sensitive notes?
The vault is yours: choose a private repo, a self-hosted Gitea, or no remote at all — git works locally. For extra caution, git-crypt or age can encrypt selected paths.
Do I need to know git?
Barely. Three commands cover daily life (add, commit, push), and note.md's sync features hide most of it. The payoff — total history of every thought you ever wrote — is disproportionate.