How do I restore an older version?
Last checked 31 Aug 2026
Short answer
Open Version history in your Lovable project, find the version you want, and revert to it — this restores the project's code (and, if bookmarked, is easy to find again) without needing GitHub.
Using Version history (fastest, no GitHub needed)
Lovable automatically creates versions as you work. To restore one:
- Open the project and go to Version history.
- Browse the list of auto-saved versions — each corresponds to a point in the chat/build history.
- Preview a version if you want to confirm it's the right one before committing to a revert.
- Select Revert to roll the project's code back to that version.
If you know in advance a version is worth returning to (e.g. right before a risky change), bookmark it so it's easy to find later rather than scrolling through history.
Show me the version from before we added the payments feature, and revert to it.
Using GitHub, if connected
If Git sync is set up, you also have full Git history in the repository as a second, independent record. You (or a developer) can check out or revert to a specific commit there, which then syncs back into Lovable.
Which to use when
| Situation | Use |
|---|---|
| Recent mistake, still in the same session | Version history revert |
| Need to compare exact commit-level diffs | GitHub commit history |
| Lovable account/project inaccessible | GitHub, if it was connected beforehand |
What usually goes wrong
- Reverting without previewing first, then discovering it also undid unrelated work made after the point you wanted to keep.
- Not realising a database/schema change isn't automatically undone by reverting front-end code — ask Lovable to check whether any data changes need to be handled separately.
- Relying only on Version history for a business-critical project with no GitHub backup — see how do I create a backup before making changes.
Sources
Was this answer helpful?
Related questions
- AnswerHow do I connect Lovable to GitHub?Open your project's Settings, go to the GitHub/Git sync integration, authorise Lovable's GitHub app, and choose or create the repository to sync with — Lovable then keeps code in sync both ways automatically.
- AnswerCan I host Lovable code somewhere else?Yes. You can download your project's code or sync it to GitHub via Git sync, then deploy it to any host that supports a Node/Vite React app (Vercel, Netlify, your own server, and so on).
- AnswerDoes Lovable automatically sync with GitHub?Yes — once connected, Git sync is automatic and two-way: changes made in Lovable push to GitHub, and commits pushed to GitHub pull back into Lovable, with no manual export step required.
- AnswerCan I edit Lovable code directly in GitHub?Yes — once Git sync is connected, you (or a developer) can edit code directly in GitHub or your own IDE, and those changes sync back into Lovable automatically.