Build your app in small, tested working steps.
Recent revisions are kept. Restoring one creates a new revision.