5

I am using Apps Script to add custom functionality to my Google Sheets:

Apps Script screenshot

Trouble is, I would like to keep track of changes made to this code base over time. Git is the obvious solution, but I couldn't find a way to make Apps Script load from a GitHub repository or something like that.

Does Apps Script have this functionality, at all? If not, what's the best way to add version control for an Apps Script project?

2
  • Thank you for asking. I just started rewriting and modernizing an App Script application written by another programmer years ago. I missed something early in my rewrite and had to CTRL-Z 8 hours of work because there are no revisions (and then had be very careful to un-undo to get my code back after rescuing the one line I missed). Commented Aug 24, 2022 at 15:03
  • @JeffreyVanAlstine sorry to hear about your experience, sounds painful. FWIW, what I ended up doing is use the good old git to version control my scripts, format them with Prettier, then run them in Apps Script and check if it works. If it does, I git commit the changes, and push to remote. Commented Aug 24, 2022 at 15:47

1 Answer 1

4

Google Apps Script has two editors, each of them has it own built-in "version control" features. On the new editor, versions are part of the deployment feature. See https://developers.google.com/apps-script/guides/versions for details.

It's worthy to note that version control in Google Apps Script web IDE is very limited but you might use the Google Apps Script API by your own or use tools like CLASP, or third party tools like Google Apps Script Github Assistant (a Chrome extension) or GasGit an open source project.

1
  • It looks like CLASP lets you develop locally and upload code - which is precisely what I was looking for.
    – Att Righ
    Commented May 3, 2023 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.