Give your repo a process for deciding what to build.
Recent revisions are kept. Restoring one creates a new revision.