קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
גרסה היא עותק סטטי של סקריפט. הגרסאות מאפשרות לכם לעקוב אחרי השינויים. אחרי ששומרים גרסה, אי אפשר לשנות אותה. כדאי להשתמש בגרסאות כשעובדים על סקריפט שעובר הרבה שינויים ואיטרציות. בפרויקטים של סקריפטים יכולות להיות עד 200 גרסאות.
כשכותבים ספרייה, צריך ליצור גרסאות. מידע נוסף זמין במאמר בנושא ספריות.
יצירת גרסה
גרסה נוצרת באופן אוטומטי כשיוצרים פריסה חדשה. אפשר גם ליצור גרסה חדשה מפריסת קוד קיימת. לשם כך, מבצעים את השלבים הבאים:
פותחים את פרויקט הסקריפט.
למעלה, לוחצים על פריסה>ניהול פריסות.
בוחרים את הפריסה הפעילה שרוצים ליצור לה גרסה חדשה ולוחצים על סמל העריכה edit.
בקטע Version (גרסה), בוחרים באפשרות New version (גרסה חדשה).
לוחצים על פריסה.
צפייה בגרסה קודמת
כדי לראות גרסה שנוצרה בעבר בפרויקט שלכם ב-Apps Script, מבצעים את השלבים הבאים:
בפרויקט הסקריפט, לוחצים על historyהיסטוריית הפרויקט.
בקטע היסטוריית הפרויקט, בוחרים את הגרסה שרוצים לראות. כדי לראות את התיאור של גרסה מסוימת, מעבירים את הסמן מעל מספר הגרסה.
השוואה בין גרסה קודמת לגרסה הנוכחית
כדי להשוות בין גרסה שנוצרה בעבר לגרסה הנוכחית, מבצעים את השלבים הבאים:
בפרויקט הסקריפט, לוחצים על historyהיסטוריית הפרויקט.
בקטע היסטוריית הפרויקט, בוחרים את הגרסה שרוצים לראות.
מפעילים את האפשרות הדגשת השינויים.
בהתאם לשינויים שביצעתם מאז הגרסה שנבחרה, יכול להיות שברשימת הקבצים יופיעו הסימנים הבאים:
עט סימון
סוג שינוי
תיאור
הקובץ נוסף
הקובץ הזה חדש בגרסה הנוכחית.
הקובץ נמחק
הקובץ הזה לא מופיע יותר בגרסה הנוכחית.
נערכו שינויים בקובץ
בגרסה הנוכחית של הקובץ הזה יש שינויים שלא היו בגרסה שנבחרה. כדי לראות את השינויים, לוחצים על שם הקובץ.
שחזור גרסה
בפרויקט הסקריפט, לוחצים על historyהיסטוריית הפרויקט.
לצד הגרסה שרוצים לשחזר, לוחצים על more_vertפעולות נוספות>שחזור של הגרסה הזו>שחזור.
מחיקת גרסאות
אפשר למחוק גרסאות באופן סופי אם הן לא בשימוש בפריסה פעילה. במאמר יצירה וניהול של פריסות מוסבר איך להעביר פריסה לארכיון או לשנות את הגרסה שבה נעשה שימוש בפריסה פעילה.
מחיקת גרסה
כדי למחוק גרסה אחת בכל פעם, פועלים לפי השלבים הבאים:
בפרויקט הסקריפט, לוחצים על historyהיסטוריית הפרויקט.
לצד הגרסה שרוצים למחוק, לוחצים על
more_vertסמל האפשרויות הנוספות>מחיקת הגרסה הזו>מחיקה.
מחיקה של כמה גרסאות בבת אחת
כדי למחוק כמה גרסאות בו-זמנית, פועלים לפי השלבים הבאים:
בפרויקט הסקריפט, לוחצים על historyהיסטוריית הפרויקט.
לוחצים על מחיקת גרסאות בכמות גדולה. בתיבת דו-שיח תופיע רשימה של גרסאות שאפשר למחוק. הגרסאות שנמצאות בשימוש בפריסה פעילה לא נכללות ברשימה.
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eVersions in Apps Script are static copies of your script, allowing you to track changes and revert to previous states if necessary.\u003c/p\u003e\n"],["\u003cp\u003eCreating versions is essential for libraries and projects undergoing frequent modifications, providing a history of your script's development.\u003c/p\u003e\n"],["\u003cp\u003eYou can easily create, view, compare, and delete versions within your Apps Script project using the provided steps.\u003c/p\u003e\n"],["\u003cp\u003eA maximum of 200 versions can be stored per script project, offering ample space for tracking your progress.\u003c/p\u003e\n"],["\u003cp\u003eVersions in use by active deployments cannot be deleted, ensuring that your deployed scripts remain functional.\u003c/p\u003e\n"]]],[],null,["# Versions\n\nA version is a static copy of a script. Versions let you track your\nchanges. Once you save a version, you can't modify it. Use versions when you're\nworking on a script that goes through many changes and iterations. Script\nprojects can have up to 200 versions.\n\nCreating versions is required when you're writing a library. For more\ninformation, see [Libraries](https://developers.google.com/apps-script/guides/libraries.html#creating-a-library).\n\nCreate a version\n----------------\n\nA version is automatically created when you create a new deployment. You can\nalso create a new version from an existing deployment by taking the following\nsteps:\n\n1. Open your script project.\n2. At the top, click **Deploy** \\\u003e **Manage\n deployments**.\n3. Select the active deployment to create a new version for and click Edit edit.\n4. In the **Version** section, select **New version**.\n5. Click **Deploy**.\n\nView a previous version\n-----------------------\n\nTo view a previously created version within your script project, take the\nfollowing steps:\n\n1. In your script project, click history **Project History**.\n2. Under **Project history**, select the version you want to view. To view the description of a version, hold the pointer over the version number.\n\nCompare a previous version to the current version\n-------------------------------------------------\n\nTo compare a previously created version to the current, or head, version, take\nthe following steps:\n\n1. In your script project, click history **Project History**.\n2. Under **Project history**, select the version you want to view.\n3. Turn on **Highlight changes**.\n\nDepending on the changes you've made since the selected version, the files list\nmight contain the following markers:\n\n| Marker | Type of change | Description |\n|--------|----------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| | File added | This file is new in the current version. |\n| | File deleted | This file is no longer present in the current version. |\n| | 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. |\n\nRestore a version\n-----------------\n\n1. In your script project, click history **Project History**.\n2. Next to the version you want to restore, click more_vert **More actions** \\\u003e **Restore this version** \\\u003e **Restore**.\n\nDelete versions\n---------------\n\nYou can permanently delete\nversions if they're not in use by an active deployment. To archive a deployment\nor change the version that an active deployment uses,\nrefer to [Create and manage deployments](/apps-script/concepts/deployments).\n\n### Delete a version\n\nTo delete one version at a time, take the following steps:\n\n1. In your script project, click history **Project History**.\n2. Next to the version you want to delete, click more_vert **More actions** \\\u003e **Delete this version** \\\u003e **Delete**.\n\n### Delete multiple versions at once\n\nTo delete multiple versions at the same time, take the following steps:\n\n1. In your script project, click history **Project History**.\n2. Click **Bulk 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.\n3. Select the versions to delete and click **Delete**.\n4. In the dialog, click **Delete**."]]