# Versions and going back

Each time your AI puts a project online, BitHut makes a new version. This page explains how to see versions, how to go back to an earlier one, and what going back does not change.

## The Versions tab

The Versions tab lists the latest 20 versions, newest first. Each one has a label:

| Label | Meaning |
|---|---|
| Current | The version that runs now |
| Earlier | A version that worked before |
| Did not start | It failed the build or the trial run; the version before it kept running |
| Starting now | BitHut is building and checking it |
| Ready, waits for resume | Built and checked while the project was paused |

Open a version to see **What we checked**, the **Build log** and the **Run log** of its trial run. A version also shows where it came from, when it was made and how long it took.

## Going back

If the newest version works worse, go back to the one before it:

1. Open the project and the **Versions** tab.
2. Press **Go back to the previous version**.
3. Confirm with **Go back**.

The earlier version starts in place of the current one, and it appears at the top of the list as the current version. Your AI can do the same when you ask it, and it can also go back to a specific older version.

The button shows only when there is an earlier working version, and not while the project is paused.

## What changes and what stays

Going back changes only the code.

- **Your data stays as it is now.** Files and databases in `/data` are not touched, and neither is the project's Postgres database. To put data back to an earlier moment, use the Data tab. See [Data](/docs/data).
- **Keys stay as they are now.** A key you changed after that version is not changed back.
- **Public build settings** are part of the build, so the earlier version has the values it was built with.

## How many versions BitHut keeps

- **Ready-to-run versions:** the last 5 that worked. You can go back to any of them. An older one shows "no longer kept" and cannot be started again.
- **The code:** the last 20 versions. Your AI can download the code that runs now before it changes the project, so a change starts from what is really online.

Once a project is online, a new change first goes to your own preview, and you put it on the site after checking it. See [Previews and working on one project](/docs/team/working-on-one-project).
