Format and check your code before each commit.
Recent revisions are kept. Restoring one creates a new revision.