Versions

  • Versions are static copies of a script that track changes and cannot be modified once saved.

  • You can create a new version from an existing deployment in your script project.

  • You can view, compare to the current version, and restore previous versions through the Project History.

  • Versions can be permanently deleted if they are not being used by an active deployment.

A version is a static copy of a script. Versions let you track yourchanges. Once you save a version, you can't modify it. Use versions when you'reworking on a script that goes through many changes and iterations. Scriptprojects can have up to 200 versions.

Creating versions is required when you're writing a library. For moreinformation, seeLibraries.

Create a version

A version is automatically created when you create a new deployment. You can also create a new version from an existing deployment by taking the following steps:

  1. Open your script project.
  2. At the top, clickDeploy>Manage deployments.
  3. Select the active deployment to create a new version for and click Edit.
  4. In theVersion section, selectNew version.
  5. ClickDeploy.

View a previous version

To view a previously created version within your script project, take thefollowing steps:

  1. In your script project, clickProject History.
  2. UnderProject history, select the version you want to view. To view the description of a version, hold the pointer over the version number.

Compare a previous version to the current version

To compare a previously created version to the current, or head, version, takethe following steps:

  1. In your script project, clickProject History.
  2. UnderProject history, select the version you want to view.
  3. Turn onHighlight changes.

Depending on the changes you've made since the selected version, the files listmight contain the following markers:

MarkerType of changeDescription

File added

This file is new in the current version.

File deleted

This file is no longer present in the current version.

File modified

This file has changes in the current version that weren't present in the selected version. To view the changes, click the file name.

Delete versions

You can permanently deleteversions if they're not in use by an active deployment. To archive a deploymentor change the version that an active deployment uses,refer toCreate and manage deployments.

Delete a version

To delete one version at a time, take the following steps:

  1. In your script project, clickProject History.
  2. Next to the version you want to delete, clickMore actions>Delete this version>Delete.

Delete multiple versions at once

To delete multiple versions at the same time, take the following steps:

  1. In your script project, clickProject History.
  2. ClickBulk delete versions. A dialog shows a list of versions that you can delete. Versions in use by an active deployment aren't included in the list.
  3. Select the versions to delete and clickDelete.
  4. In the dialog, clickDelete.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.