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.