Document version history in SharePoint
Files stored in SharePoint have a version history. You can easily revert a file to a previous state.
So if there is a problem with the file, you can restore it to a point in time before the error.
Enable version history in a document library
Before using it, make sure it is active in the document library you want to use it in.

In the Documents library, click the gear icon in the top right corner. Then choose Library Settings from the menu.
Click on Versioning Settings in the settings menu.

The “Create major versions” option should be enabled by default. And you can enter a large number in the input field labeled “Keep the following number of major versions.”
This way you will have enough previous versions to restore the one you need!
Restore a file version
Once versioning settings are enabled, you will be able to view and restore previous versions of a file in a document library.

For any file you want to view the history of or restore to a previous version,
- Click the three-dot menu corresponding to the file. It will only appear when you hover over the item.
- Select Version History from the menu options.

The “Version History” menu opens. You can either download a copy or restore a previous version to the current version of SharePoint.
- Click on the modification date and time of the version you want to download and it will download.
- Click the small arrow to the right of the modification date. This will open a menu where you can restore the file or delete it.
There is a view option in Version History. But it doesn’t open the file in preview mode as you might expect. It only displays information about the file, most of which is visible in “Version History.”
Version history is also very useful. It allows you to see who created each version of the file in the “Modified by” column. This way, you know who is responsible for changes to your file.