Document versions, accessed through Revert To…, are a major part of the protection macOS provides for dealing with errors. How to get the most from them.
undo
Bridging the gap between Undo and backup, its a major productivity feature implemented using a hidden folder at the top level of each volume.
How can I undo Terminal commands?