Fast-forward an entity from one branch to another

POST /Platform/entities/{entity_type}/{entity_id}/fast-forward

Fast-forward an entity from one branch to another.

The git merge --ff-only equivalent: succeeds only when to_branch's head is an ancestor of (or equal to) from_branch's head, i.e. nothing on to_branch would be lost. No new commit is created — the to_branch pointer is moved to from_branch's head commit, so both branches share one lineage afterwards. This is the single-entity promote step for the standard branch workflow documented by merge-branch.

If the branches have diverged (both have independent commits), this is a 409 carrying the diff (diff/changed_fields in the error body), and nothing is written. Resolve by restoring one side (restore) or re-applying changes, then fast-forward again.

Use dry_run=true to preview: reports whether the fast-forward is possible and returns the diff, without writing anything.

Path parameters

Body parameters

Returns

FastForwardResponse

Example request

curl -X POST "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}/fast-forward" \
  -H "Authorization: Bearer $HILUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'