Skip to main content
Two situations bring you to this page:
  • A workspace and its branch both changed. This needs a mounted workspace: the commands take a mount path like /work, and the mounted directory is where conflicts get resolved. The normal loop is: rebase onto the branch, fix any conflicts, snapshot the resolution, then promote. The daemon seals pending local WAL before the rebase starts.
  • Two branches diverged. tl git merge merges them directly on the server — no mount, no clone, no working copy. It runs from any machine with the CLI, or from your control plane with the SDKs.
Tensorlake never force-overwrites a branch. If a merge cannot land cleanly, nothing is published unless you explicitly choose a mode that materializes conflict markers.
If you are working in a clone, none of this applies — use ordinary git merge, git rebase, and git push; Tensorlake is a normal remote. See Git or the tl CLI? for the one-rule guide.

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 git rebase /work main.
  2. Edit the conflicted files.
  3. Snapshot the resolved files.
  4. Promote again.

Rebase the Branch into a Workspace

tl git rebase replays the workspace onto the target branch. The mounted directory updates in place:
If the rebase 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:
The daemon serializes the transition with autosave and seals pending local WAL before rebasing, so edits do not race the base change.

Sync a View

tl git sync /work [<ref-or-full-commit>] has a narrower role than rebase. It refreshes the current source or switches a read-only or snapshot-free writable view, carrying any unsnapshotted WAL tail onto the new base. It refuses a switch that would rewrite an established workspace snapshot chain and directs you to tl git rebase instead. Use sync for checkout-like source changes before a workspace has snapshot history. Use rebase once workspace commits must be replayed onto another base.

Structured Conflict Records

A merge that materializes conflicts — a --materialize direct merge or a conflicted rebase — records more than markers. Each conflicted commit carries a structured record naming every path and the three-way terms it was merged from, available to the control plane and queryable without parsing file contents:
Nothing is silently overwritten: both sides of every conflict remain reachable from the record.

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 structured conflict record. 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

Repository Mounts

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

Architecture

How the merge engine and conflict policies work internally.