Whenever I use a software for coding or any other stuff. They usually have history folder, where every saved file version can be found and that version can be used to retrieve info.
Imagine a case :
I have a working file, I opened it up, made some temporary changes to see how things works, close the file and mistakenly saved it. Now the temporary changes become permanent, and there is no way I found to retrieve the working file back.
A solution could be, when save is called, rename the current file to some name. Save current file to actual path, move the renamed file to a specified location. Thats how other software works.
Or is there built-in way ?