# Branches and baselines

AI agent getting started? Read [Agents: start here](https://docs.openeng.io/agents/start-here.md) first.

Keep design alternatives and read-only snapshots.

Source: https://docs.openeng.io/guides/baselines/

A branch holds a version of your engineering data. Use a working branch for an alternative and a baseline to preserve a read-only organisation snapshot.

## Branches and baselines

Each organisation has a trunk named `main`. An organisation admin can create an organisation-wide branch or read-only snapshot (called a baseline) from `main`. Every reader of the organisation can read it. An admin can mark a writable organisation-wide branch read-only to make a baseline; that mark cannot be cleared.

In the web app, choose your project, then create or select a branch by name. The platform handles the project identifier for you. See [Propose, compare and merge](https://docs.openeng.io/guides/change-control.md) for the workflow.

## Create and preserve a snapshot

An organisation administrator can use `openeng org-refs create` to create an organisation branch or baseline from main. Use `openeng org-refs list` to inspect the returned name and read-only state. To freeze an existing writable organisation branch, use `openeng org-refs mark-read-only`; the mark cannot be cleared.

Read [CLI commands](https://docs.openeng.io/reference/cli.md) for the required fields. Before freezing a branch, open it and confirm it contains the design you intend to preserve. A read-only baseline cannot receive a merge or become a proposal target.

## Branch references in the CLI

Branch creation takes the project and branch name separately. `openeng link` commands that accept `--ref` currently require `main` or the full `<projectId>/<branch>` reference returned by the platform.

This includes `ontology` and `change-set` links. A bare branch name or change-set ID is refused, and baseline names are not currently accepted by `openeng link`.
