iCloud is good for syncing. But syncing isn't backup.
If you accidentally delete a note, iCloud deletes it everywhere. If you make an edit you regret, iCloud overwrites the old version. If your iCloud account gets compromised, your notes are at risk.
Git gives you real version history. Every change tracked. Every version recoverable. Complete control.
Why back up with Git
Version history See what a note looked like last week, last month, last year. Compare versions. Restore old content.
True backup Push to a private GitHub repo (or GitLab, or your own server) and you have an off-site backup that iCloud can't touch.
Diff viewing See exactly what changed between versions. Useful when you're refining ideas over time.
Branching for experiments Try reorganizing your folder structure in a branch. If it doesn't work, delete the branch. Your main notes stay untouched.
Plain text forever Your notes are already Markdown files. Git is the natural companion for plain text versioning.
How to set it up (Mac)
This takes 5 minutes the first time. After that, it's automatic.
Step 1: Find your Brain Dump folder
Open Terminal and navigate to your Brain Dump folder:
cd ~/Library/Mobile\ Documents/iCloud~com~voicebraindump~app/Documents
(If the path is different, open Finder, go to iCloud Drive → Brain Dump folder, right-click, hold Option, and choose "Copy as Pathname")
Step 2: Initialize Git
git init
git add .
git commit -m "Initial commit of Brain Dump notes"
That's it. You now have local version history.
Step 3: (Optional) Add a remote backup
If you want off-site backup:
- Create a private repository on GitHub (or GitLab, or Bitbucket)
- Copy the repository URL
- Add it as a remote:
git remote add origin YOUR_REPO_URL_HERE
git push -u origin main
Important: Make sure the repository is private. These are your personal notes. Don't publish them publicly.
How to use it daily
Once set up, backing up is simple:
# Navigate to your Brain Dump folder
cd ~/Library/Mobile\ Documents/iCloud~com~voicebraindump~app/Documents
# See what changed
git status
# Add all changes
git add .
# Commit with a message
git commit -m "Added project notes and daily journal"
# (Optional) Push to remote
git push
I do this once a week. Takes 30 seconds.
Automate it with a cron job (Advanced)
If you want automatic daily backups, create a shell script:
Create the script:
nano ~/brain-dump-backup.sh
Add this content:
#!/bin/bash
cd ~/Library/Mobile\ Documents/iCloud~com~voicebraindump~app/Documents
git add .
git commit -m "Auto backup $(date +%Y-%m-%d)"
git push
Make it executable:
chmod +x ~/brain-dump-backup.sh
Add to crontab (runs daily at 11 PM):
crontab -e
Add this line:
0 23 * * * ~/brain-dump-backup.sh
Now your notes back up automatically every night.
What gets backed up
Everything in your Brain Dump folder:
- All Markdown notes
- Any subfolders you've created
- Custom templates if you've added them
What doesn't get backed up:
- App settings (those are in iOS preferences, not the folder)
- Audio recordings (if you've saved any)
How to restore a note
Restore from recent history:
git log --oneline
# Shows recent commits
git show COMMIT_HASH:path/to/note.md
# Shows content of note at that commit
git checkout COMMIT_HASH -- path/to/note.md
# Restores that version
See what changed:
git diff HEAD~1 path/to/note.md
# Shows changes since last commit
Undo recent changes:
git reset --hard HEAD~1
# Rolls back to previous commit (use carefully!)
Real-world use cases
I accidentally deleted a folder I was reorganizing folders and deleted "Project Ideas" by mistake. iCloud synced the deletion to all devices within seconds.
I ran git log, found the commit from yesterday, ran git checkout HEAD~1 -- "Project Ideas", and the folder came back with all 23 notes intact.
I edited a note and regretted it I rewrote a journal entry, trying to "improve" it. The new version lost the raw honesty of the original.
Ran git diff to see what changed. Ran git checkout -- journal-2025-01-10.md to restore the original. Back in business.
iCloud conflict destroyed a note I edited the same note on my iPhone and Mac at the same time. iCloud created a "conflicted copy" that was garbage.
Checked Git history, found the last good version from an hour ago, restored it. Conflict resolved.
Combining Git with iCloud
iCloud and Git serve different purposes:
iCloud = sync across devices Your notes appear on iPhone, iPad, Mac automatically.
Git = version history and backup You can time-travel through changes and have an off-site copy.
Use both. They complement each other.
Troubleshooting
"Permission denied" when pushing Make sure you've set up SSH keys or use HTTPS with a personal access token. GitHub has docs on this.
Git is slow with many files If you have thousands of notes, Git might slow down. Consider archiving old notes to a separate repo.
Merge conflicts in notes If you edit the same note on two devices before Git commits, you might get conflicts. Open the note, choose the version you want, commit.
What about binary files? Git works best with text. If you save images or PDFs in your Brain Dump folder, they'll be versioned too, but they'll bloat the repository. Consider keeping media elsewhere.
Why I do this
I've lost notes before. Hard drive failures. Cloud sync bugs. Accidental deletions. It sucks.
Git is insurance. I hope I never need it. But when I do, it's there.
Five minutes of setup. Thirty seconds a week to commit. Complete peace of mind.
Related guides:
- Recover from iCloud conflicts for resolving sync issues
- Export to Obsidian for using notes in a knowledge base
- Folder organization for structuring your backup
