find past versions of app script in new editor

Viewed 1396

I accidently overwrote a long function. I want to revert to an older, working version of my code.gs file.

App script auto saves every time I debugged the script.

I assume the older saved versions are found in Executions but when I open the project or container I'm presented with the current version of my script. ??

How do I get, view, or load a past iteration of my scripts?

thanks.

1 Answers

Only the current file revision is available to view in the new editor. Previous file revisions must be accessed using the legacy editor. To view previous file revisions:

  1. Click "Use legacy editor".
  2. (Optional) Select Missing file version history in the Editor Opt-out Survey, click Submit, then close the survey window.
  3. Click on the tab of the file that you want to see the history of.
  4. Select File > See version history or use Ctrl+Alt+Shift+H.

You can now view the revision history of the file and restore a previous version of the file if needed. When you're done, click "Use new editor" to go back to the new editor if desired.

Related