With every saving of changes of the template a new version will be saved in the “Template” library. Using SharePoint standard features a former version of the template can easily be restored.
After editing the page you can save it with all your modifications as a new version of a template.

Follow the three steps in the picture below and a new version of these template will be created automaticlly.

If you want to restore or view one of the versions of a template, you can do this in the templates library.

Now you can view, restore an delete the versions. Only the active version isn't deletable.