Skip to main content
DOCS

Branches & versions

Fork your backend, merge with real conflict resolution, and roll back to any version — history is append-only.

Branch your backend like you branch your code

Branches give a workspace parallel lines of development: each branch has its own spec, deployed infrastructure, conversation history, and API keys. main always exists; fork from it, build, then merge back with real conflict resolution.

Branch lifecycle

not_deployed → deploying → active
                     ↘ error (fix & regenerate)   rolling_back (during rollback)
  1. Create

    Fork feature-checkout from main. New branches start without infrastructure until you generate.

  2. Develop

    Design and generate against the branch — its conversation and spec are independent of main.

  3. Preview the merge

    A dry-run three-way merge shows what auto-merges and what conflicts, per asset, endpoint, and relationship.

  4. Merge

    Resolve each conflict by picking source, target, or both. The merge is applied in a two-step confirm, then you regenerate the target branch to deploy it.

Versions & rollback

Every deploy records a version: timestamp, who deployed, and a summary of assets/endpoints added, removed, or modified. Rollback restores any prior version and redeploys — as a new version, so history is append-only and nothing is ever erased.

CLI
codata versions list my-app
codata rollback my-app 5

Rules & guardrails

  • Branch names: lowercase letters, numbers, hyphens, slashes; 2–100 chars. main can't be deleted.
  • Merging updates the target's spec only — generate afterwards to deploy the merged result.
  • Deleting a branch is destructive (endpoints, data, conversations, branch-scoped keys) and requires an explicit two-step confirmation.
  • Branches mirror to the workspace's git repo when one is connected.