Lovable: Git Sync Recovery Restores Overwritten Work

LovableView original changelog

Lovable now automatically keeps a backup of project work when a push to the connected repository overwrites it. Users can restore the saved work from Project settings → Git, or keep the repository version instead. Restored work syncs back to the repository, or to a lovable-sync branch when newer commits exist.

Key Takeaways

  • Lovable now backs up work automatically when a repository push overwrites it.
  • Restore or keep: users choose in Project settings → Git between the saved Lovable work and the repository version.
  • Restored work syncs back to the repository.
  • A lovable-sync branch is used when newer commits exist, so those commits are not clobbered.
  • It reduces the risk of two-way sync, where outside edits could silently replace in-editor work.
  • No setup needed, since the backup is preserved automatically.

A safety net for Git pushes

Lovable added Git sync recovery. When a push to a connected repository replaces work done in Lovable, Lovable now keeps a backup so that work is not lost.

How recovery works

Lovable preserves the backup automatically, with no setup. Users then choose what to do in Project settings → Git. They can restore the saved Lovable work, or keep the repository version.

Where restored work goes

Restored changes sync back to the repository. When the repository already has newer commits, Lovable syncs the restored work to a separate lovable-sync branch instead. That avoids overwriting those newer commits.

Why it matters

Two-way sync can let edits made outside Lovable replace edits made inside it. Recovery turns that from a permanent loss into a decision the user can make.