Skip to main content

Overview

When multiple people work on the same Kodexa environment — some editing resources in the UI and others pushing changes from YAML files — conflicts can occur. The CLI uses sync state files to detect when a resource on the server has changed since your last pull. This prevents accidental overwrites where one person’s changes silently replace another’s, giving you the chance to review and merge before pushing.

How It Works

Each time you run kdx sync pull, the CLI records the changeSequence of every fetched resource in a state file at .sync-state/<env>.yaml. When you later run kdx sync push, the CLI compares the stored sequence against the server’s current value:

Example Conflict Output

When a conflict is detected, you will see a warning like:
The resource is skipped, and all other non-conflicting resources continue to be pushed normally.

The --force Flag

Use --force to push conflicted resources anyway, overwriting server-side changes:
Using --force overwrites any changes made to the resource on the server since your last pull. Always review conflicts before force-pushing.

Sync State Files

State files are stored at .sync-state/<env>.yaml in your repository root, one per environment:
Commit state files to git. This allows your team to share the same baseline — if one person pulls and commits the state file, others will get conflict detection even without pulling themselves.
For teams where some users edit resources in the Kodexa UI while others manage YAML files:

Environment Name Resolution

The state file name is derived from the environment:
  • --env dev4 creates .sync-state/dev4.yaml
  • --to-url https://dev4.kodexacloud.com creates .sync-state/dev4.kodexacloud.com.yaml
  • --to-profile myprofile derives the name from the profile’s URL
This means each environment’s state is tracked independently — a conflict on dev4 has no effect on pushes to staging.