Save all your code changes in one local commit.
Recent revisions are kept. Restoring one creates a new revision.