Mage has file versioning built-in— that means you don’t need to configure Git to roll-back changes or recover old file versions.
Any update to the contents of a file will create a new version that can be used to restore a file to a previous state. This also includes changes to a pipeline.
Configure the number of versions per file
You can set how many previous versions to keep track of for every file.
Set the following environment variable name and value:
|Value||Any integer value.|
Where are the file versions stored?
Each file version is stored in the following directory:
For example, if your project name is
demo_project, then the directory will be
.file_versions to your
For more information, please read the project setup guide.
How to view file versions
- Open a pipeline.
- Edit the pipeline.
- In the file browser on the left side of the page, click on a file.
- Near the top on the right side, click the button Show versions.
- A list of previous versions for that file will appear in the right side panel.
How to restore to a previous version
- In the right side panel, click on a previous version.
- Click the button labeled Replace with this version.
- The contents of the file will be updated with the contents from the previous version.