Never lose work

Splitleaf treats your files the way a careful text editor does. It compares with the disk before it saves, and it keeps a copy before it removes or replaces a file. Two places hold the copies: Removed and History. Both stay on this computer.

Removed

Removed holds the files that the App removed or replaced in the last 30 days.

Before these acts, the App keeps a copy of the old file in Removed or in History:

  • You delete a page, an item, an image or another file.
  • Discard puts back the live version of a file.
  • The agent, team sync or a format update writes over a file.
  • A save makes a file much smaller: less than half its size, and more than 4 KB smaller.
  • You click Keep mine, and your version replaces the version on disk.

To restore a file, open Site settings and click Removed. For the steps, see Removed.

The App removes entries older than 30 days, or when Removed holds more than 200 MB. It never removes an entry less than 24 hours old.

Each removal and each copy also gets a line in an audit log in app data.

History

History shows every version of a file since its last publish, kept on this computer. Publishes and changes from your team show in the same list.

Open History

The History window over the Code editor, with the Page and Styles tabs, the current version, a Published version and Highlight changes.
History keeps the versions of a page. Select one to see it, then restore it if you need it.
  1. Open a page in the Design panel.
  2. In the top bar, click History (the clock icon).
  3. Click a tab: Page (or Component when you edit one) or Styles.

The item editor in the Content panel also has a History button.

RowWhat it is
Current versionThe file as it is now
Edited, Edited styles, Edited componentA save from the App
Agent editA change from the agent
Changed outside SplitleafA change from another tool, for example your IDE
From the teamA change that team sync brought in
DiscardedThe file after a Discard
Published, StagedA publish or a stage of the file. A publish can show the name of the person who published.
LiveThe day of the version that is on the live site now

Versions close together in time show as one row. Click the row to see each version.

Restore a version

  1. Click a row. The Design panel shows that version, read-only.
  2. To see what a restore changes, turn on Highlight changes.
  3. Click Restore this version.
  4. The App asks Restore this version? Click Restore.

Restore adds a new version on top. Your current version stays in History. To go back to the current version, click Close.

Note: The App lists a file larger than 2 MB, but does not keep its bytes. The row shows Too large to keep.

The rules every save obeys

The Design panel, the Code editor, the Content panel, the agent and team sync obey the same rules.

  1. No edit, no write. When you open, switch or close a page, or publish, the App writes nothing to a file you did not edit.
  2. Every save compares with the disk. A save of a page, an item, a stylesheet or a component names the version it was made on. If the file changed since, the App merges the two, or asks you. Settings write only the keys you changed.
  3. Nothing is destroyed without a copy. Before a removal, or before a write that is not yours, the old bytes go to Removed or History.
  4. One working copy for each file. The Design panel, the Code editor and Page settings show the same copy.
  5. An outside change starts a new undo list. Undo never writes older bytes over a change from another tool.

Each write, move and removal of a site file goes through one gate in the App, which holds these rules. A test runs random writers against the gate. After each step, it checks that nothing was lost.

More protection:

  • Safe saves. A save writes a temporary file, then renames it over the old file. A crash never leaves half a file.
  • Save before quit. Before the App closes, it saves all edits that wait.
  • One save at a time. Two saves of one file never run at the same time.
  • No empty publish. A publish with no pages stops with Nothing was published: no pages were found in this site.
  • Git as a last copy. Every publish is a commit on GitHub. See Git and GitHub.