The first time it happened, I was writing a paper. The paragraphs I had just typed vanished into thin air, faster than Time Machine or Backblaze could save them. Gone. The next occurrence was during app development; Xcode suddenly flagged numerous errors in previously error-free code. My recent changes to several files were erased.
Months later, the mystery is solved: iCloud Drive detected a file conflict. It assumed different versions of the same file existed on my Mac and iPhone and couldn’t merge them automatically. This was impossible; the affected files were never opened on the iPhone. But they were in iCloud, as I had moved my Mac’s Documents folder there.
Dropbox manages version conflicts by storing all conflicting files side by side, labeled as “(John Doe’s conflicted copy)“. iCloud Drive, however, doesn’t show these conflicts in the file system. If you open the file in an editor that supports conflict handling, a popup appears asking which version to keep. Editors like Textifier, Xcode, or Obsidian, lacking conflict handling, leave iCloud to decide which version to store on your disk and in your backup.
Over time, newer backups overwrite older ones containing the correct version; your content is gone for good. The only way to get it back is to open the file with an editor that supports conflict resolution.1 Once moved out of iCloud Drive, even that won’t help. The content is lost.2
Masking version conflicts might appear user-friendly, but it has catastrophic consequences. You might not discover the data loss until years later, when reopening significant but infrequently used documents.
Until iCloud Drive exposes version conflicts in the file system or a central, easily accessible location, my strong recommendation is to move all crucial data out of it. Meanwhile, set up a Git repository to monitor your critical files; you might uncover surprising changes.