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

# Version history

> Every build, edit, and save is a git commit in the project's private repo. Revert anytime — a revert is itself a new commit, so history is never erased.

Mythos keeps a full version history of your project automatically. Every build, every edit, and every
save in the [workspace editor](/features/workspace-editor) is a **git commit** in the project's
private repository. You can look back through those versions and restore an earlier one whenever a
change doesn't work out.

Restoring an earlier version doesn't throw away the newer ones. A revert is itself a **new commit**
layered on top of your history — so your timeline keeps growing forward, and you can always revert the
revert.

<Note>Version history is built in and free. It's a property of how Mythos stores your project (one
git commit per change), not a feature you turn on.</Note>

## Why it matters

* **Nothing you build is lost.** Every version is a commit, so you can always go back to a working one.
* **Reverting is safe.** A revert never erases the versions after it — you can undo a revert just as
  easily.
* **A clean record.** Each commit is named after what it did, so the history reads like a list of what
  changed and when.

## How a version is recorded

You don't do anything to save a version — it happens on every change:

| Change               | Becomes                                                      |
| -------------------- | ------------------------------------------------------------ |
| A new build          | A commit on a fresh repo                                     |
| An edit (by prompt)  | A new commit on top of your history                          |
| A save in the editor | A new commit on top of your history                          |
| A revert             | A *new* commit whose contents match the version you restored |

## How to revert to an earlier version

<Steps>
  <Step title="Open the version history">
    In the workspace, open your project's history to see the list of versions, each labeled with what
    it changed.
  </Step>

  <Step title="Find the version you want">
    Browse the list and identify the version you want to go back to. You can preview an earlier
    version before committing to it.
  </Step>

  <Step title="Revert to it">
    Choose to restore that version. Mythos creates a new commit whose files match the version you
    picked, and the preview updates to show it.
  </Step>
</Steps>

<Warning>Reverting changes which version is live in your workspace. The newer versions are **not**
deleted — they stay in your history and you can return to them — but anything in the editor you
hadn't saved when you revert is not part of a committed version and won't be restored. Save your work
first.</Warning>

## How revert actually works

A revert in Mythos is a **forward move, never a rewind of history**:

1. Mythos takes the exact file contents of the version you chose.
2. It writes them as a **new commit** placed on top of your current latest version.
3. Your project now shows that restored content — but every version in between is still there.

Because the in-between versions are never erased, you can revert *to* an old version and then revert
again to come back to where you were. Mythos deliberately never does a "hard reset" that would orphan
your newer work.

<Note>The very first seed commit a new repo is created with (a bare README) is hidden from your
history, so the list shows only your real builds, edits, and saves.</Note>

## Good to know

* **Each project has its own private repo**, so each project has its own independent history.
* **History is preserved on every revert** — restoring an old version always adds a commit; it never
  deletes one.
* **Editing is locked while you preview an old version.** Return to the latest version to make changes
  again.
* **Reverting doesn't cost credits.** It's a history operation, not a build.

## Troubleshooting

| Problem                                           | Fix                                                                                                          |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| You reverted by mistake                           | Revert again — pick the version you were on before. Nothing was lost; that version is still in your history. |
| Unsaved editor changes disappeared after a revert | Only committed versions are restorable. Save edits before reverting so they become a version.                |
| You can't edit after looking at an old version    | You're previewing an earlier version, which locks editing. Return to the latest version to edit.             |

## FAQ

<AccordionGroup>
  <Accordion title="Does reverting delete my newer versions?">No. A revert is a new commit on top of your history. Every version stays, so you can revert the revert.</Accordion>
  <Accordion title="Where is my history stored?">In the project's private repository that Mythos manages — one commit per build, edit, and save. Export to your own GitHub anytime (connect your GitHub account first).</Accordion>
  <Accordion title="Does reverting cost credits?">No. Reverting is a history operation, not a build, so it doesn't spend credits.</Accordion>
  <Accordion title="Can I undo a revert?">Yes. Because no version is deleted, you just revert again to the version you were on.</Accordion>
  <Accordion title="What about unsaved changes in the editor?">They aren't a committed version, so a revert won't restore them. Save first.</Accordion>
</AccordionGroup>

## Related

* [Building and editing](/features/building-and-editing) — every build and edit is a commit you can return to.
* [Workspace editor](/features/workspace-editor) — every save is a version too.
* [Plan mode](/features/plan-mode) — shape a project before the first version is built.
