Skip to main content
Merging happens when a workspace and a branch both changed after the workspace was created. The workspace is where agents resolve conflicts. The normal loop is: snapshot local work, sync the branch into the workspace, fix any conflicts, snapshot again, then promote. Tensorlake never force-overwrites a branch. If a merge cannot land cleanly, promotion publishes nothing unless you explicitly choose a mode that materializes conflict markers.

Promote a Workspace

If the target branch has not moved since the workspace was created, promotion lands the workspace on that branch:
If the branch moved, a plain promotion fails instead of overwriting someone else’s work. Add --merge when Tensorlake should merge the workspace with the latest branch tip:
When the changes do not overlap, this lands one merge commit combining both histories. If the branch did not move, it fast-forwards like a plain promotion.

When Promotion Conflicts

If the workspace and branch changed the same content, promotion publishes nothing. The target branch and workspace stay unchanged, and the command reports each conflicted path:
Resolve the conflict in the workspace:
  1. Run tl fs sync /work.
  2. Edit the conflicted files.
  3. Snapshot the resolved files.
  4. Promote again.

Sync the Branch into a Workspace

tl fs sync pulls the target branch into the workspace. The mounted directory updates in place:
If the sync conflicts, Tensorlake writes standard Git diff3 markers into the workspace files:
The file carries the branch version, the merge base, and the workspace version:
Edit the file to resolve the conflict, then snapshot and promote:
Sync refuses to run over unsnapshotted local changes because those changes could hide pulled content. Snapshot first. Use --fail-on-conflict when a conflicted sync should change nothing instead of writing markers. Use --target to pull from a branch other than the one the workspace was created from.

Shared Read-write Mounts

On a shared read-write mount, every snapshot is merged into the branch automatically. Agents editing different files, or non-overlapping regions of the same file, usually merge cleanly. When two agents change the same content, the snapshot still lands with diff3 markers in the conflicted file and a structured conflict record on the commit. Any agent following the branch can resolve the markers by editing the file and snapshotting. Nothing is silently overwritten. Conflicted commits are flagged in the dashboard’s activity feed, and the record is queryable without parsing file contents:

Merge Branches Directly

Use tl git merge when you want to merge one branch into another without creating a workspace. Preflight first to see what would happen. It never writes:
A shallow preflight reports same-file collisions as potential conflicts. Add --deep when you need exact text-merge results:
Drop --preflight to land the merge:
A conflicted direct merge publishes nothing and exits non-zero. Add --materialize to land it anyway with markers and a conflict record, the same contract as shared read-write branches. Add --json for machine-readable reports.

How Merging Runs

Merges run server-side with a three-way merge engine. Tensorlake does not clone the repository, check out a working tree, or scan every file. Merge cost scales with the number of changed paths, not total repository size.

Conflict Kinds

Conflict reports classify each path:

Next Steps

Writable Mounts

Mount, snapshot, and promote — the workflow merging builds on.

Architecture

How the merge engine and conflict policies work internally.