Conflicts

A conflict means the same note changed in two places since ForkLeaf last looked. It is not an error, and nothing has been lost — you are being asked which version you want.

How a conflict is detected

Each pending change records the SHA of the file it was based on. Before pushing, ForkLeaf checks whether the file on GitHub still has that SHA. If it does not, someone else — your other laptop, a collaborator, a GitHub Action, or you editing the file directly on github.com — has changed it in the meantime.

Rather than overwriting, the change is held and a conflict is raised. The status bar turns red and the resolution dialog opens.

Resolving one

You are shown both versions side by side, and you have three choices:

Keep mine

Your local version wins. The remote version is replaced — and remains in the git history, so it is recoverable.

Keep theirs

The remote version wins and your local edits are discarded. Copy anything you want out of your version first: unlike the remote one, your local edits were never committed, so they are not in the history.

Keep both

The safe choice. Your version is saved alongside the remote one under a new filename, and you merge them by hand afterwards. Nothing is thrown away.

Dismissing the dialog does not resolve anything. The conflict stays, and the status bar keeps a count you can click to reopen it. Pushes for that note are paused until it is settled; other notes continue to sync normally.

Avoiding them

  • Press ⌘S before you close the laptop, so your device is not carrying stale pending changes.
  • Let a device finish syncing before you start editing the same note somewhere else — the status bar tells you when it has.
  • For notes several people edit, give each person their own file and link between them. Git is good at separate files and bad at the same paragraph.

Why there is no automatic merge

ForkLeaf could run a three-way text merge. It deliberately does not. A silent automatic merge of prose produces a document that reads as if someone wrote it, when in fact nobody did — and you would have no reason to check. Showing both versions is slower and honest.

Real-time collaborative editing, where the merge is continuous and visible, would need a server holding shared document state. ForkLeaf has no such server, by design — see How ForkLeaf works.