Repository navigation
History and merge
Tide never loses a text. Every note keeps its past versions, and three situations bring two texts together: restoring an old one, making a copy and merging it back, and writing the same note from two devices.
When the text of a note changes, the old text is kept as a version:
- one per writing session: a pause of 15 minutes closes it, and the next change starts a new one;
- and at least one per hour in a long session;
- no limit on the number. A save with no change does not count.
Versions follow the note into the trash and go with it when it is erased for good. Rewrites from the CLI, an agent or a tag rename keep the earlier text in the history too.
Open the history from the context panel (Normal and Advanced, on a screen of 1024 px and up), or from the clock at the bottom of the note on a phone.
- The most recent version is the current text, dated from its last save: a note never modified, an imported note for example, therefore already has one. The following ones are the old texts.
- A click on a version shows it. The history is collapsible like the related notes.
- Compare, Restore this version and New note from this version are icons with a tooltip. Compare shows the lines of that version struck through and those of the current text underlined.
- Restore this version puts the text back in the note, like a keystroke: it is saved, and ⌘Z undoes it.
- New note from this version creates a note with that text and its tags. On the current text, it is the only one active.
tide show note /Projects/Ideas --history
tide show note /Projects/Ideas --version <uuid>
tide edit note /Projects/Ideas --restore-version <uuid>New note from this version makes a copy that remembers its original. The copy is a free place to rework a text: the original is untouched.
When you are done, the toolbar of the original lists its copies. Merge into the original note brings the copy's changes back, line by line from the text the copy departed from, in the manner of a merge request:
- changes in different places merge on their own;
- if the copy and the original changed the same spot, the Conflicts window lets you choose, for each, Keep the copy, Keep the original or Both, or Keep the original everywhere;
- nothing is saved if you cancel, and the original's old text stays in its history;
- the merge is refused if the original is deleted or locked.
What becomes of the copy afterwards is a setting, After a merge in Settings > Editor: Ask every time (the default), Move the copy to the trash or Keep the copy. Undo the last merge gives the note its previous text and the copy back from the trash, until the note is edited again.
Under a note, Forked from names the original of a copy, and Forks lists the copies of an original.
If the note changed on another device while the editor is open, the two texts merge line by line at the next save, losing nothing, and a message warns you.
- Changes in different places merge by themselves.
- Lines changed at the same spot on both sides open the Conflicts window, with Here, Result and Other device side by side. For each conflict choose Mine, Theirs or Both (or take a single line with its arrow), then Save, which is active once every conflict is resolved. Keep theirs everywhere saves at once with the other device's text.
- Your own text is kept in the history in every case, marked as a conflict version.
- If the merge is not possible (the note is locked elsewhere, the network is down), the app warns that nothing is saved anymore, and Reload keeps your text in the history before reading the note again.
For API users: every write can carry the updated_at it read, and the server answers 409 if the note changed since, so a device left open never overwrites what another wrote. See API.
Tide
Using Tide
Terminal and agents
Hosting and development