hlix push, pull & sync
Synchronize a local folder with committed files in HLIX Repos.
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.
First synchronization
Section titled “First synchronization”A new managed repository starts with an initialization commit. To publish a folder:
hlix init --project <project-id>hlix pushAn 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.
Preview changes
Section titled “Preview changes”hlix sync --dry-run --jsonThe 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.
Continuous synchronization
Section titled “Continuous synchronization”hlix mirrorhlix mirror --jsonmirror checks for changes every 15 seconds until you stop it with Ctrl-C. JSON output is one report per line. Resolve any reported conflict before synchronization can continue; both local and remote files remain intact.
If reconciliation fails
Section titled “If reconciliation fails”not_initialized—Run hlix import or hlix init to bind this folder to a project.conflict—This folder and HLIX Repos have both changed. Resolve the differences before syncing; no files were replaced.Reconcile the two sides, then run the command again.conflict—HLIX Repos changed. Pull or sync before pushing.Runhlix pullorhlix syncfirst.conflict—HLIX Repos changed during upload. Retry sync.conflict—Incoming repository file would replace an excluded local file: …Move or remove the local file your ignore rules exclude, then pull again.conflict—Select a primary repository for this project before syncing.Choose the project’s primary repository in the dashboard.scan_blocked— the local scan found a blocker; the message lists each one.