# Version history

Save versions of your project, see what each one changed, and go back to any of them.

Save versions of your project and go back to any of them. Lyna keeps the history of your project in Git: every AI turn leaves a version card in the chat, and you can save named versions yourself.

Settings open on Versions with a list of saved versions and the New version button.

## What you can do

- Save a named version at any time.
- See which files a version changed, with a diff for each file.
- Preview an earlier version from the chat, then go back to the latest.
- Restore any version. Your current changes are saved as a backup first.
- Rename or delete a version.
- Bookmark a version from the chat.

## Open the history

| Where    | How                                                                                                                                                                     |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Top bar  | Choose **Version History**, the clock next to undo and redo (in **More actions** in a narrow window), or open the save state and choose **Restore an earlier version**. |
| Settings | Open **Settings > Project > Versions**.                                                                                                                                 |

The Versions page lists the versions of the branch you pick, 10 a page with **Previous** and **Next**. **Refresh the history** reads it again.

## Save a version

1. ### Choose New version

   On the Versions page, choose **New version**. The first one is called **First version**.
2. ### Name it

   **Rename version** opens at once: type a **Name** and choose **Save**. A clear name, such as "Before the new pricing page", makes it easy to find later. To change it later, open the version's menu and choose **Rename**; the same menu has **Delete**.

## Restore a version

1. ### Pick the version

   On the Versions page, choose the changes button of a version (**See the changes in** and its name) to open its changes: how many files changed, the file tree, and the diff of every file in one scroll.
2. ### Restore

   Choose the restore button of the version (**Restore** and its name), then confirm in **Restore this version?** with **Restore**. Your current work is saved as a version first, so nothing is lost. The preview reloads.

The Restore this version? confirmation dialog.

## Versions in the chat

After each AI turn, the chat shows a version card. From it you can:

- **Preview**: open that version on the canvas. The composer is paused while you look. Choose **Back to latest** to return.
- **Revert to this version**: bring the project back to that state.
- **Bookmark this version**: mark it so you find it again.

You can also edit an earlier message and choose **Revert and resend**. Your files go back to the version before that message, then the edited message is sent again. Later messages in that chat are removed.

> [!NOTE]
>
> **History needs a running sandbox**
>
> Versions are read from your project's sandbox. If you see **History is not available yet** when you open a project, wait until the sandbox is running.

## Auto save

Turn on **Auto Save** in **Settings > Project > Project details** to save your changes after each edit. The save state in the top bar shows **Saved**, **Unsaved**, **Save pending**, **Saving…**, **Backing up…**, **Save failed** or **Storage full**.

## Related

- [Git](/features/code/git): Commits, branches, stash and tags.
- [Branch graph](/features/code/branch-graph): See your branches over time.
- [Debugging with the AI](/prompting/debugging): When to revert and when to fix.
