Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do I do if my Apps Script didn't save?

I was working on an AppScript with a personal account. I clearly remember saving it. However when I looked back the next day, all the progress I made was gone.

I deployed it once around 30 min in and that deployment's code is still there in the version history. After that, I just used test deployments to test all changes, and none of the changes were saved. I lost about 3 hours of javascript and would prefer to not have to rewrite it. Is there a way to get back the lost code? This happened around 3 days ago.

I was expecting for my code to save, but instead it didn't.

like image 613
Super Sauce Avatar asked Jan 21 '26 22:01

Super Sauce


1 Answers

The script editor does not synchronize code between windows, so one explanation is that you had opened the same script project in two windows, worked in one, saved that one, then saved the other one (where there were not as many changes.) The second window could have been opened on another computer.

You're saying that you deployed the script. Deploying requires that you save a version, so perhaps you can use Project history to recover the lost code. The button is third from top in Script editor and it looks like a clock 🕓 with a counter-clockwise arrow ⤺.

For more advanced code management, use clasp.

like image 77
doubleunary Avatar answered Jan 24 '26 11:01

doubleunary



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!