> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mage.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# File versioning and history

> Local file edit tracking and version history for restoring changes made in the past.

Only in Mage Pro.

Try our fully managed solution to access this advanced feature.

[Get started for free](https://cloud.mage.ai/sign-up?source=file-versioning)

Mage Pro includes built-in file versioning, eliminating the need to configure Git for rolling back changes or recovering previous file versions.

### How It Works

Every update to a file's contents automatically creates a new version that can be restored at any time. This applies to all files, including pipeline configurations.

### Restoring a Previous File Version

1. **Open the file** – In the pipeline editor, select the file you want to recover from the left hand file browser
2. **Access version history** – Click the "Version history" button in the top-left portion of the file browser

![Version history button](https://raw.githubusercontent.com/mage-ai/assets/main/pro/features/click-version-history.png)

3. **Compare versions** – Version history selects the most recent saved version by default. Choose another version from the newest-first list when needed. Use **Split** to show the current saved file in the **Current** pane on the left and the selected historical version in the **Version** pane on the right, or use **Inline** to review the changes in one editor. On narrow screens, the comparison automatically uses the inline layout.
4. **Restore** – Review the highlighted changes, then click the **Restore version** button to apply the selected version

To leave version history without restoring a version, click **Back to current file**.

Once restored, the selected version becomes the current active version of your file.

### Opening Version History from Activity

When an Activity audit event targets a file, Mage records the file path in the event details and shows readable file actions such as **Created file** and **Updated file**. URL-derived file paths are decoded for display, while literal percent sequences provided in request payload paths are preserved. You can search Activity with the full path or a filename segment to find the event, then click **Open versions** in the detail panel to open that file in Coder with version history visible.

You can also link directly to the same Coder view by adding both `paths[]` and `file_versions_path` to the URL:

```text theme={"system"}
/apps/coder?paths[]=/home/src/demo/pipelines/example.py&file_versions_path=/home/src/demo/pipelines/example.py
```

When Coder opens or reloads with `file_versions_path`, it loads the file, opens version history, and selects the most recent saved version automatically. The history panel preserves the normal newest-first version list; select another saved version to compare it with the current saved file or restore it.

Version history gives you the confidence to experiment and iterate freely without fear of losing work. If you make a mistake or need to reference previous logic, you can always roll back to any saved version.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.