Back to docs
multi-device

Version History

Automatic Version History

Strayfiles automatically saves a version snapshot every time you save a note. View previous versions, compare changes, and restore if needed.

How It Works

Every save creates a new version:

Version 1: "Initial content"      (MacBook, Dec 9 10:00)
Version 2: "Added introduction"   (MacBook, Dec 9 10:15)
Version 3: "Fixed typos"          (iMac, Dec 9 11:30)
Version 4: "Added conclusion"     (MacBook, Dec 9 14:00)

Each version stores:

  • Full content at that point in time
  • Version number (sequential)
  • Device that made the change
  • Timestamp

Viewing Version History

  1. Open a note
  2. Click the history icon or use keyboard shortcut
  3. See list of versions (newest first)
  4. Click any version to preview

Version Details

Each version shows:

FieldDescription
VersionSequential number (1, 2, 3…)
DeviceWhich device made this change
DateWhen the change was saved
SizeContent length

Comparing Versions

Select two versions to see a diff:

- Old content that was removed
+ New content that was added
  Unchanged lines shown normally

The diff view shows:

  • Lines added (green/+)
  • Lines removed (red/-)
  • Unchanged context
  • Addition/deletion counts

Restoring a Version

To restore a previous version:

  1. Open version history
  2. Find the version you want
  3. Click “Restore”
  4. Confirmation prompt
  5. New version created with old content

Restoring creates a new version - the old content becomes the newest version, preserving full history.

Auto-Pruning

To prevent unbounded growth, Strayfiles keeps the most recent versions:

  • Default: 50 versions per note
  • Oldest versions pruned when limit exceeded
  • Pruning happens after each save

For most notes, 50 versions covers months of editing history.

Device Attribution

Version history tracks which device made each change:

v4: MacBook Pro      "Added API documentation"
v3: iPhone           "Quick fix from mobile"
v2: MacBook Pro      "Restructured sections"
v1: MacBook Pro      "Initial draft"

This helps debug sync issues and understand edit history.

Git Backend

If using the Git backend, version history uses Git commits instead:

  • Full Git history available
  • No version limit
  • Use standard Git tools for advanced operations

The UI still shows versions the same way.

Version History Without Git

Even without Git, you get full version history:

  • Works with Redb backend (default local storage)
  • Local snapshots stored in ~/.strayfiles/versions/
  • Synced via Stray Cloud
  • Not available for Memory or WASM backends (no filesystem)

Tips

Before major edits: Make a small save first to create a checkpoint.

Accidental overwrites: Version history lets you recover from “oops I pasted over everything.”

Reviewing changes: Use diff view to see exactly what changed between versions.

Mobile edits: Device attribution helps track changes made from different devices.

Limitations

  • Binary files (images) not versioned
  • Version content is full snapshots (not incremental)
  • Very large notes use more storage per version