Builtin Library
README.md
zm.merge
Merge a branch into the session's branch — git merge <source>.
The merge runs locally in the world; nothing reaches ZeroMind until the result is pushed with zm.push. When the session's head is in the source's history the head fast-forwards onto it; otherwise a two-parent merge commit lands. { noFf = true } always makes a merge commit and { ffOnly = true } refuses anything but a fast-forward.
Local changes follow git's rule: one on a path the merge rewrites refuses the merge with git's Your local changes ... would be overwritten by merge message, naming the paths; every other local change stays in the working tree. A scene's unsaved live edits count as a local change to its scene.json: a fast-forward that rewrites that scene refuses, naming the scene and how to save or discard the edits, and a merge commit refuses over any scene holding them.
On conflicts, git-style markers are written into each conflicting text file and the cleanly-merged remainder is applied; zm.status lists the unmerged paths. Resolve each (edit out the markers, or take one side whole with zm.checkout("", { paths = { p }, theirs = true })), then zm.add + zm.commit — that commit records the merge. zm.merge("", { abort = true }) aborts the merge in progress.