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

# Version control

> Version control in Same.new lets you track changes, undo edits, and collaborate across app versions. Build safely with full history and rollback.

Same automatically saves checkpoints of your project as you work.

## Checkpoints

Checkpoints are created automatically:

1. **After agent actions:** When Same edits, creates, or deletes files. The checkpoint is linked to the agent's message block.
2. **For user messages:** Capturing the project state *before* your instruction was processed.

This creates a detailed history of your prompts and Same's actions.

## Viewing History

Major versions (created when Same explicitly versions the project) are shown in the **Version History** panel.

1. Click the **Clock icon** in the top-right of the chat panel.
2. A dropdown shows major versions and the latest state.

<img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/clock-icon.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=39c8c3c032bc9e299c40d96b2dc873da" alt="Screenshot showing the clock icon and the version history tab." width="365" height="285" data-path="images/clock-icon.png" />

## Reverting to a Version

You can revert to a specific version to restore your project to a previous state.

<Steps>
  <Step title="Preview a Version">
    Click the **preview button** on the version you would like to preview. This (temporarily) sets your project to the given version, allowing you to preview and assess the version.

    <img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/version-actions.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=4eb065234992bb5807dc4231fa37a754" alt="Screenshot the actions for a version in the list." width="1061" height="665" data-path="images/version-actions.png" />
  </Step>

  <Step title="Rollback to the Version">
    Once you have reviewed the version and decide to revert back to it, click the **Rollback** button to **permanently revert** back to that version.  Clicking this **permanently** resets the project to that state. All later messages and changes are **deleted**. Use with caution.

    <img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/version-controls.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=8bd5fbba57b85edd019f20bc66832c65" alt="Screenshot the controls for a version (while previewed)." width="562" height="267" data-path="images/version-controls.png" />
  </Step>
</Steps>

## Reverting to a Checkpoint

You can interact with checkpoints associated with user messages and agent actions.

<Steps>
  <Step title="Preview a Checkpoint">
    Click **Rollback to message** next to a message or action block. This loads a **preview** of the project state at that point in the workbench (editor, preview, terminal).

    <img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/message-rollback.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=51526c9839d4770e6e357cc044f05ebd" alt="Screenshot showing the 'Rollback' button next to a message." width="360" height="141" data-path="images/message-rollback.png" />
  </Step>

  <Step title="Revert to a Checkpoint">
    After restoring (previewing) a checkpoint, the button changes to **Revert to message**. Clicking this **permanently** resets the project to that state. All later messages and changes are **deleted**. Use with caution.

    *Note: You can create a [Remix](/essentials/project-management#remix) of your project to retain the history before you revert.*

    <Note>
      Restoring/reverting a user message loads the state *before* that message
      was processed.
    </Note>

    <img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/message-revert.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=c0584d5cc7345995ec775f62dc833731" alt="Screenshot showing the 'Revert to message' button on a user message block." width="204" height="148" data-path="images/message-revert.png" />
  </Step>

  <Step title="Return to Latest State (Exit Preview)">
    If you are previewing an older checkpoint and want to return to the current state *without* reverting:

    1. Click the **Clock icon**.
    2. Select **"Latest changes"** at the top.
       The workbench will reload the most recent project state.

    <img src="https://mintcdn.com/same/6v_Kyyhq-0v66NVR/images/latest-version.png?fit=max&auto=format&n=6v_Kyyhq-0v66NVR&q=85&s=c5173a913b2713680e21e505f81cfc95" alt="Screenshot highlighting the 'Latest changes' option in the version history dropdown." width="701" height="278" data-path="images/latest-version.png" />
  </Step>
</Steps>
