Skip to content

Push, pull & sync

Synchronize a local folder with committed files in HLIX Repos.

Local and cloud are each compared against the base commit they last agreed on. Only one side changed means push or pull; both changed is refused as a conflict rather than merged.Local.hlix/state.jsonCloud headGit commitBase commitLast synced commitlocal moved?cloud moved?verdictunchangedunchangednonechangedunchangedpushunchangedchangedpullchangedchangedconflictPush checks the expected remote commit.If it moved, sync stops with a conflict.

Run these commands from a folder bound by hlix init --project <project-id> or hlix import. HLIX Repos stores committed files; .hlix/state.json records the last synchronized commit and file identities.

Command Behavior
hlix push Publishes local files when the remote still matches the synchronized commit.
hlix pull Applies remote files when the local folder has no unsynchronized changes.
hlix sync Pushes or pulls when only one side changed.

If both sides changed, the command exits with a conflict and replaces no files. Reconcile the differences before trying again.

A new managed repository starts with an initialization commit. To publish a folder:

Terminal window
hlix init --project <project-id>
hlix push

An existing remote with source files cannot be overwritten by an unbound local baseline. Use an empty folder to pull it first.

Local Git history, remotes, and branch selection stay in place. Secrets use the encrypted secrets path and are excluded from ordinary source commits. A pull refuses to overwrite existing files excluded by local ignore rules.

Terminal window
hlix sync --dry-run --json

The result includes action (push, pull, none, or conflict), localChanged, cloudChanged, and commitSha. This sync dry run transfers no files and exits 1 only for conflict; other reported actions exit 0. pull --dry-run also exits 1 for a conflict. push --dry-run reports conflicts with exit 0.

All three commands accept --dry-run and --json. Select your target through the bound folder or the usual workspace and API settings.