# Versions & recovery

Versions preserve manuscript milestones. Automatic history provides additional checkpoints while you work. Both are separate from any ordinary Git repository you maintain for sharing code or sources.

## Save meaningful milestones

Choose **Save version** in the editor header, next to **Track changes**, or open **Review → Versions**. Give the version a meaningful name such as “Before reviewer 2 revision” or “Camera-ready candidate”.

A named version preserves source and, when a matching successful build is available, that build's PDF. A source-only label means the version has no matching compiled PDF. Compile before saving when retaining an exact output is important.

You can also select an automatic checkpoint and choose **Mark as saved version**. This names that earlier source snapshot and retains its original PDF if it was successfully built. Your current draft stays in place.

Use named versions before substantial agent work, project-wide replacement, submission preparation or experimental formatting. Some guarded workflows, including table publishing and linked-result acceptance, create a checkpoint automatically before changing manuscript files.

## Compare versions and files

Select two versions or compare a saved version with the working draft. Use the searchable file list and inspect one file at a time. Side-by-side and unified views show line locations and changed words. Optional data and assets can be included when relevant; saved JSON can be displayed as readable fields.

A source comparison explains what changed. In **Compare**, switch between **LaTeX** and **PDF** to inspect the rendered pages side by side, with linked scrolling. PDF comparison finds retained successful builds for the selected sources, including an identical source snapshot saved under a different checkpoint. An existing PDF from a different draft is not presented as the output of this version.

**Highlight changes**, on by default, marks the words removed on the left PDF and the words added on the right. Text that only moved to another page, page numbers, running heads and words split by a line-end hyphen are not marked, and a page where most words changed says **Many changes on this page** instead of covering it in boxes. Turn it off to stop VersoFold reading the two PDFs' text; the choice is remembered in this browser.

If a side has no matching PDF, choose **Build this version**. VersoFold compiles the saved sources in a temporary folder with the named version’s saved main file and engine; automatic checkpoints use the current build settings. Your working sources and current PDF stay unchanged. The resulting PDF is labeled **Rebuilt from saved sources**, since today’s installed packages may differ from those used originally. Missing captured dependencies or build errors appear with a build log. **Build working draft** saves pending edits and compiles the current project directly from History.

Choose **Fullscreen** in the header to expand History to the whole window. **Exit fullscreen** or Escape returns it to the smaller view without losing your comparison.

## Delete a named version

Select a saved version and choose **Delete version…**. Confirm the named entry you want to remove. This removes its name from Saved versions; it keeps your working files, automatic source checkpoints, and retained build artifacts. You can name a retained checkpoint again later. Shared readers cannot delete versions or compile historical sources.

## Restore carefully

Restore the intended file from a saved version or automatic checkpoint. Choose it in **Compare** or **Saved files**, then select **Restore file**. VersoFold checks that the current revision has not changed since the decision and creates a safety checkpoint. If another editor has changed the file, refresh the comparison and inspect the new state instead of forcing an old decision.

To put a whole version back, select it and choose **Restore this version…**. The confirmation lists each file it would replace or bring back and how many already match. Data and assets are included only when you tick **Also restore data & assets**. Your current files are checkpointed first, and files added since that version stay as they are: a restore never deletes. Figures that Figure Studio publishes are not restored from history, because an older copy would look like an outside edit and stop the next build; the build makes them again from the data instead.

For a partial recovery, inspect the historical passage and restore only what you need through normal editing. A whole-file restore can intentionally replace newer work; choose it only after reviewing the comparison.

If a restore or guarded update reports a conflict, keep your current draft, inspect the conflicting versions and retry from fresh evidence. Do not delete project metadata to dismiss the error.

## Variants, forks and frozen versions

Open **Paper versions & variants** in the history tools for alternative document entries. **New shared variant** previews an extraction: a simple single-file document can become a shared `<entry>-body.tex` with separate entry files/preambles. Later variants reuse that body. Changes to the common body affect the entries that include it. Complex or already split projects can use **Register existing entry** instead.

**Create independent version** copies captured sources into `version/<name>/`. This is an independent working copy, not an automatically synchronized branch. You can start from a frozen submission when preparing a revision. Entry files preserve the original relative-path context; the target list is recorded in `version/manifest.json`.

Set venue class, anonymity, bibliography style and page limits explicitly in each entry's preamble. A name such as “camera ready” does not change template settings. **Build clean PDF**, then **Freeze snapshot**, to preserve the matching original PDF. Changed sources/settings make a snapshot source-only instead of silently pretending the older PDF matches.

**Build revision-marked PDF** compares a fixed baseline with captured current sources using the bundled revision helper. Markup is generated in an isolated build directory; it does not rewrite live source. Inspect complex mathematics, figures, bibliography changes and custom macros carefully. Builds retain an exact source ZIP and build instructions; failed builds preserve previous successful artifacts.

Freezing a manuscript version is distinct from freezing a remote dataset or Figure Studio asset. The former preserves a writing milestone; the latter pins inputs or outputs used by builds. A reproducible submission often needs both source history and preserved data provenance.

For an independent folder copy, use **Home → workspace menu → Make a copy**. This is useful when you explicitly want another workspace rather than another historical state in the same one.

## Storage and backups

History lives in `.versofold/history.git` inside the manuscript folder. Older app-managed history can be migrated from the personal history location on first use. This private history repository is independent of the project's own `.git` repository.

Copy hidden project files when backing up or transferring a workspace. Also back up the personal reference library if you need attached literature and verification records; those may live outside the manuscript folder.

> **Recovery limit:** missing historical Git objects cannot be recreated from a current file. VersoFold can offer the oldest available baseline, but that is not a reconstruction of lost versions.

## Choose the right recovery tool

| Situation | Appropriate action |
| --- | --- |
| Just made an editor mistake | Undo in the editor. |
| Need to reject a pending tracked change | **Reject** on its card or in the Review tab. |
| Need to undo an accepted or untracked change since sign-off | **Review → Compare with approved version**, using a current comparison. |
| Need an older file | Version history and guarded restore. |
| Need the whole paper as it was | **Restore this version…** in History. |
| Need to undo a layout adjustment | Its checked Undo action, or its named checkpoint if newer edits exist. |
| Need to send history to a collaborator | Use a complete workspace backup or an explicitly configured Git workflow. |

Related: [comments and review](comments-review.md), [Git and export](sharing-export.md), [troubleshooting](troubleshooting.md).
