The sync baseline
Every command that makes the workspace and the project match records a baseline inxano/xano.lock, under synced: one content digest per object, kept per workspace and per Xano
branch.
Commit the lock after each of these, so everyone (and CI) compares against the same baseline. A
fresh clone of a lock with no baseline still diffs, but cannot say which side changed.
See what differs, and which side changed
workspace diff exits 0 when the workspace matches your compile and 2 when anything your
project declares differs or is missing, so a script can branch on it. Under --json the
differences are sorted by the side that moved since the baseline. An excerpt, for a project whose endpoint was edited in the Xano editor while a table changed in
git (the full document also carries branch, live, missing, unexpected and warnings):
With no baseline for the Xano branch,
baseline is null and the four lists are empty;
differing still lists what differs.
The guard on deploy --to workspace
Since 1.0.8, deploy --to workspace reads the baseline before it writes. If an object it would
overwrite is in changedThere or changedBoth, it refuses with exit 2 and
SDK_WORKSPACE_CHANGED, and lists the objects under details.objects:
--overwrite warns and names what it overwrote. A --dry-run refuses nothing: it lists the
objects under changedInXano.
The guard counts only what the deploy writes. A merge leaves an object that only the workspace
holds alone, so an object added in Xano is refused over only under --prune or --replace,
which would delete it. It refuses nothing when the Xano branch has no baseline, over an
unclassified difference, or on a --branch deploy to a Xano branch that does not exist yet.
It reads the workspace once, before the confirmation, so an edit made after that read is not
caught.
Bring an editor change back into git
WhenchangedThere lists a change you want to keep, pull it into the project on a git branch
and review it like any other change:
pull lists what it will change and asks first, and it refuses a dirty working tree. Add
--branch <label> to read a Xano branch that is not live. The pull also records a new baseline,
so the next workspace diff reports the workspace and the project in step.
To decide which side should own the backend at all, see
Source of truth.
Check for drift on a schedule
A scheduled job tells you about an editor change the morning after, not at the next deploy. This workflow runsworkspace diff every weekday and fails when anything differs:
2 fails the job and the log shows which side changed. changedHere on a schedule usually
means a merged change that has not been released yet. changedThere means someone edited in
Xano. CI/CD covers the credentials this job uses.