Conflicts and recovery
Understand keep-both file conflicts, transactional Git conflicts, and isolated recovery exports.
Code Folder Sync never merges lines. If two stable versions cannot both occupy the same canonical state, it keeps both complete byte sequences and records the causal evidence.
Ordinary conflicts
If alpha and beta both savesettings.json from the same base and alpha reaches the hub first, every peer converges to two files:
settings.json
settings.CODEFOLDERSYNC-CONFLICT.beta.8c12f09d.jsonThe original contains alpha's exact bytes. The sibling contains beta's exact bytes. Executable meaning and symlink target text follow the competing version.
Resolve file conflicts
codefoldersync conflicts
codefoldersync history
rg --files /path/to/code | rg 'CODEFOLDERSYNC-CONFLICT'Inspect both files, create the intended result, then delete or rename the extra sibling with normal filesystem or Git tools. Those changes sync like any other save. Do not delete hub objects or recovery directories to make a conflict disappear.
Git conflicts
Concurrent valid .git states become explicit conflict manifests, not a directory of independently merged refs and indexes. Inspect both histories, then choose deliberately:
codefoldersync conflicts
codefoldersync resolve-git <conflict-id> --take canonical
# or
codefoldersync resolve-git <conflict-id> --take conflictRecover a manifest
Materialize retained content to an unrelated empty destination without changing the synchronized folder:
codefoldersync recover <manifest-or-conflict-id> \
--to /absolute/empty/pathCrash recovery
Replacements, deletes, renames, and Git swaps use durable journals and recovery locations. Startup restores the last local baseline before normal hub reconciliation. Recovery data is retained by default and is a separate crash-safety layer from synchronized conflict siblings.