In plain words
Reverting makes a new commit that undoes an earlier one, so the bad change leaves your code but stays on record.
Where you see it
The agent "fixed" a spacing bug in Quill and now nobody can log in. Lovable's history lets you restore an earlier version; in git, the same move is git revert on the commit that broke it.
What goes wrong
- Reaching for git reset --hard
Reset moves the branch backwards and throws away later commits and any unsaved work. On a branch you've already pushed, it also rewrites history other people rely on.
git reset --hard HEAD~3 - Asking the agent to undo it in words
The agent rewrites the code from memory and gets it nearly right. Reverting the commit gives you the exact old code back.
- Reverting the code but not the database
If the bad commit included a migration, the database keeps whatever that migration did after you revert the code. Check whether the commit touched the schema.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYesterday's commit broke QuickBite's checkout. Today's three commits are fine. What should you do?