Why I Started Daily GitHub Backups for Claude Code
Versioning control + rollbacks.
Increasingly it’s starting to feel that anyone deep in building agentic workflows would benefit from having software engineering basics. One of them is daily GitHub backups.
Reminds me of a painful lesson from 2017. I had a Surface Pro laptop, and stored all of my important work and personal files inside. Suddenly, my laptop stopped working and I had to send it for an RMA repair. None of my local documents could be restored.
Luckily I had done an ad-hoc Dropbox sync about 3 months ago, but that meant I lost 3 months of work.
From that day onwards, I only worked on files that were synced to Dropbox. Saved me a few close calls.
Fast forward to today, and this is exactly the same risk I have with Claude Code. All of my workflows, skills, and projects are stored locally on my MacBook Pro. If anything goes wrong with the machine and the data can’t be accessed, I’d lose months of work.
Claude Code Backups via GitHub
That's where I started backing up my Claude Code work to GitHub.
Here’s how it works
Tell Claude Code which folders need to be synced and which folders to ignore
Be careful not to push any secrets or API keys
Connect Claude Code to GitHub.
Create a private repo
Set up a daily push automation using macOS’s native scheduler, “launchd”. I didn’t even know this existed before, which pushes to GitHub 12am daily.
GitHub takes care of versioning. You can always roll back or restore later.
Why this matters now?
Feels like with the recent npm supply-chain attacks (e.g. the TanStack incident: https://openai.com/index/our-response-to-the-tanstack-npm-supply-chain-attack/), having the ability to roll back your Claude Code setup becomes more even more important.
Versioning isn’t just for losing your laptop in my opinion, but it’s for the day a dependency, a NPM packaging or an MCP server gets compromised and you need to revert to a previously good state.
PS: I’m not SWE trained, so I’m very curious to know. Is this actually best practice, or is there a better way to do this? Would love to learn how others are handling it!

