zeon sync

Commit, merge the cloud's changes, push and refresh your instance in one command.

zeon sync [-m MESSAGE] [--no-refresh] [--world W]
zeon sync --continue [-m MESSAGE]
zeon sync --abort

zeon sync keeps your working tree and the cloud project in agreement. It is safe to run at any time, including when you forgot to pull first. It stops only when the same lines of a file changed both locally and in the cloud.

What it does

  1. Reads the cloud's latest commit. If the cloud has not moved since your last sync and you have nothing new, it prints already up to date and stops.
  2. Saves your uncommitted changes as a local commit with the message local changes saved before sync. To choose the message, run zeon commit -m "..." before zeon sync.
  3. Merges the cloud's changes into your working tree. A file only one side changed takes that side. A text file both sides changed is merged line by line. A binary file both sides changed keeps the cloud's version; yours is saved under .zeon/backups/<path> and the output says so.
  4. Stops on a conflict. When both sides changed the same lines, it writes conflict markers into the file, prints CONFLICT <path> for each, and exits with code 1. See Conflicts and a diverged project.
  5. Pushes. If the cloud had nothing new, it pushes your commits: synced — pushed <sha>. If you had nothing new, it moves to the cloud's commit: synced — fast-forwarded to <sha>. If both sides had changes, it records a merge commit (message from -m, default merge cloud changes) and pushes it.
  6. Refreshes your instance when it has this project loaded, and prints instance refreshed.

Options

OptionMeaning
-m, --message TEXTMessage for the merge commit, when one is needed.
--continueFinish a sync after you resolved the conflicts. Refuses while a file still has conflict markers.
--abortCancel a sync that stopped on a conflict: removes the merge and the markers and restores your files as they were. Prints sync aborted — your local changes are intact.
--no-refreshDo not refresh your instance after the push.
--world WWhen the instance is refreshed, also load world W (default: the loaded world is kept).

While a sync is stopped on a conflict, zeon sync without --continue or --abort refuses to start another one, and zeon push refuses to push.


Did this page help you?