A pattern from the Claude Code and Cursor subreddits: someone builds for three weeks, asks for one more feature, and the AI rewrites half the project. The app breaks, the working version is gone, and the thread title is some variant of "how do I get my code back?" Usually they can't.
This post is the prevention list, from someone who reads those threads daily. I work on a product in this space (disclosed below), but most of what follows needs no product at all.
Why this keeps happening
AI coding tools edit files in place. Unless something is saving copies, there is exactly one version of your project: the current one. The AI has no undo across sessions, and "can you restore what we had yesterday" gets you a confident reconstruction from its memory of the conversation, which is not your code and rarely runs.
Option 1: learn just enough git
Git is the versioning tool programmers use, and you need three commands, not a course. In your project folder, ask your AI assistant to run them for you and explain each one: git init once, then git add -A && git commit -m "works" every time the app is in a state you'd be sad to lose. Restoring an old version is where git gets genuinely hostile to beginners, so also ask your AI to handle that moment when it comes. Cost: free. Risk: the restore step is exactly when panicked people make things worse.
Option 2: GitHub Desktop
A point-and-click app that does the above with buttons and shows you what changed between versions. No terminal. You still have to remember to commit, and restoring still involves concepts (branches, reverts) that bite under stress. But it's free, mature, and made by GitHub.
Option 3: copies of the folder
Zip the project folder when things work, name it with the date. Genuinely fine for small projects, scales terribly, and you will forget on the week it matters. If you do nothing else, do this.
Option 4: automatic checkpoints
This is the category I work in: Plyo connects to your AI over MCP, and every work session becomes a checkpoint on a timeline without you remembering anything. Restore is one click and never deletes history, so a bad restore can itself be undone. It also publishes your app online with safety checks. Free for three projects. The honest trade-off versus git: less control, less to learn, and you're trusting a product rather than a universal tool.
The one habit that beats every tool
Whichever option you pick, the failure mode is the same: saving only when you remember, which means never during the exciting parts. So anchor it to the AI instead of yourself. Literally add to your instructions file: "after any change that works, commit it" (git) or let checkpoints happen automatically (Plyo).
Top comments (0)