Why git is the perfect vault backend
Databases need backups you'll forget to make. Sync services need subscriptions and trust. Git makes each commit history and each push an off-site copy; saving a file does not commit it automatically. In the agent era it earns its keep twice over — when agents write into your vault, git makes committed changes diffable, attributable, and revertible. An agent's bad day can become 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 built-in Sync to Vault command copies files into your git-synced vault with date-prefixed names and conflict-aware refresh; recent-file history can be mirrored through the vault.
- Auto-commit: on a single writer, schedule
git add -A && if ! git diff --cached --quiet; then git commit -m "auto" && git push; fi. It skips clean runs; multi-device setups still need an explicit pull/conflict policy. - Multi-device: clone the repo on a second machine; 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?
You need the basics: add, commit, pull, push, and conflict resolution. note.md writes ordinary files and provides Sync to Vault, but it does not replace Git's history or conflict model.