# Versions and history

In a Space, nothing gets lost quietly. Each note keeps its versions, and the Space keeps a list of what was created, moved, renamed or deleted, so you can undo it.

Both need the note to sync with a Space, and you signed in. A note that's only on your device has no history in Niv.

## A note's versions

Open the note, open the right rail and choose **History**. Under **Versions**, each line says who changed the note and when, like "Ana · 14:03 to 14:11". The one at the top is **Current**.

![A note's History tab, listing versions by who wrote them and when](https://niv.md/docs-media/history.dark.png)

### Compare two versions

Choose **Compare**, then pick another version. Niv shows what was **Added** and **Removed**, and who wrote each change.

### Restore a version

Choose **Restore this version**, then **Replace the text**. The note gets that version's text, as a new change by you. The versions before it stay in the list.

The text of each version is kept for 90 days. After that, the version is still listed, but its text can't be shown or restored.

## Edits made at the same time

The same **History** tab lists the places where you and someone else edited the same part of the note at the same time. Those come first, under **Needs a look**. See [Writing together](/p/docs/writing-together).

## The Space's history

Go to **Settings › History**. It lists what was created, moved, renamed or deleted in the Space, by whom, and when. Text edits aren't shown here; they're in each note's versions.

- **Show what changed** opens a change to show each note or folder it touched.
- **Undo** reverses a change. Niv says what it will do first, such as putting deleted notes back where they were. Anything changed since then stays as it is.

Undo needs a connection to the Space.

## Bring back a deleted note

- **Right after deleting**, choose **Undo** in the message that appears.
- **A note that synced with a Space**: find the delete in **Settings › History** and choose **Undo**.
- **A note that was only on your device**: it's in your folder's trash, `.niv/trash`. Move the file back from there. The `.niv` folder is hidden; on macOS, ⌘⇧. in Finder shows hidden folders.

---

Published with [Niv](https://niv.md/) in the Space Docs.
