> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Branches

> Work on a set of Ontology changes together, try them in the app and in Threads, and merge them into main as one reviewed change.

> [!NOTE]
>
> **Availability:** Branches is in **private preview** and needs [Config Files](https://docs.textql.com/core/ontology/config-files.md). Contact your TextQL team to turn it on for your organization.

![The branch switcher open in the sidebar, listing main, your branches, New branch and All branches](https://mintcdn.com/textql/bYheoJVauG6ofiMj/images/ontology/branches/switcher.png?fit=max\&auto=format\&n=bYheoJVauG6ofiMj\&q=85\&s=23ac6883bb9849babd230613eed397f6)

A **branch** is a named line of Ontology changes that starts from main and merges back into main as one change. Nothing on a branch is live until it merges, so you can build up a larger change, see how the app and Ana behave with it, and review it as a whole.

## Create a Branch

Open the branch switcher in the sidebar and choose **New branch**, or choose **New branch** on the Branches page, which **All branches** in the switcher opens. Give it a name and, optionally, a description. A branch always starts from main.

![The Branches page listing main and your branches, with how far each is behind and ahead of main](https://mintcdn.com/textql/bYheoJVauG6ofiMj/images/ontology/branches/branches.png?fit=max\&auto=format\&n=bYheoJVauG6ofiMj\&q=85\&s=fe305f7539df1ba16f7a96535ab8a8c3)

* **Review at merge**: changes land on the branch right away, and their Owners review everything once, when you merge. Without it, each change on the branch is reviewed by its Owners as it would be on main. Changes to folder access (OWNERS files) always need their Owners first. You choose this when you create the branch.
* **Private**: only you and the people you share it with can see the branch. Otherwise everyone who can read the Ontology can see it.

You can also ask Ana to create a branch from a Thread. The Thread then continues on the new branch.

## Work on a Branch

Pick a branch in the switcher to put the current browser tab on it. Branch mode belongs to the tab: other tabs stay where they are, and a tab you open from a branch tab starts on the same branch.

While a tab is on a branch:

* Each page shows a **branch chip** with how far the branch is ahead of and behind main, and a menu to switch branches, open the branch's page, update from main, merge, or leave the branch.
* Lists of playbooks, agents, dashboards, data apps, pipelines and evaluation questions, and Home, mark what the branch adds, changes or deletes. Home has a **Changed on branch** filter.
* Opening an object the branch changes shows the branch's version.
* The Ontology editor shows the branch's files.

![The branch chip menu, showing changes ahead and behind main and options to switch branch, open the branch page, update from main, merge to main or leave the branch](https://mintcdn.com/textql/bYheoJVauG6ofiMj/images/ontology/branches/branch-chip.png?fit=max\&auto=format\&n=bYheoJVauG6ofiMj\&q=85\&s=70e2dd5201068cfd06609e8e8ed0a4b6)

### Edit on a Branch

Saving an object from a branch tab saves it onto the branch, never onto main. If you open an object the branch hasn't changed, choose **Edit this on the branch** to start editing its branch version. To change main itself, leave the branch first.

In the Ontology editor on a branch you can edit existing files. To create, rename, delete or upload files on a branch, ask Ana in a Thread on the branch.

### Nothing Runs From a Branch

A branch shows what its changes would do without letting them act. Playbooks, agents, dashboards and data apps on a branch don't run on a schedule, can't be triggered, and don't send messages. From a branch tab, data apps and dashboards can read data but can't write it or run actions. Everything runs as normal once the branch merges.

### Threads on a Branch

A Thread started from a branch tab answers from the branch's Ontology, and changes Ana proposes land on the branch. Ontology Actions are shown rather than carried out. To start a Thread on main instead, use the branch chip in the message box.

## Share a Branch

Each branch has its own sharing, from the **Share** button on its page:

| Role | Can |
| - | - |
| **Viewer** | See the branch and switch onto it |
| **Editor** | Change the branch, if they can also edit the Ontology |
| **Owner** | Share the branch with others |

You become the Owner of a branch you create. Admins who can manage the whole Ontology can see and manage every branch. A branch never changes who can read a file: folder access always comes from main.

## Stay Up to Date With Main

Choose **Update from main** to bring main's latest changes into the branch. If main and the branch changed the same lines, TextQL names the conflicting files and offers **Resolve with Ana**, which opens a Thread on the branch to work through them. The resolution is reviewed like any other change.

## Merge or Close

Choose **Merge to main** to file the whole branch as one change against main. It lands right away if the branch's changes were already approved by their Owners; otherwise it waits in the **Reviews** tab until they approve it, as described in [How a Change Goes Live](https://docs.textql.com/core/ontology/config-files.md#how-a-change-goes-live).

Closing a branch discards it. Merging or closing a branch denies any changes still open on it and stops Threads on it from taking more changes. Its page and history stay available under **All** on the Branches page.

## Evaluate a Branch

If your organization uses Evaluations, you can run evaluation questions against a branch before it merges, and compare the branch with where it left main. Choose **Compare evals with main** from the branch page's menu.

## Related

* [Config Files](https://docs.textql.com/core/ontology/config-files.md): how a change goes live, reviews and runners
* [Role & Access](https://docs.textql.com/core/ontology/ontology-rbac.md): folder access and Owners


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.