> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/codev/branch-operations/tracking-branches.md).

# Tracking additional branches

A **tracked branch** is a branch codev watches for merges and pull requests. Everything codev automates for your trunk — building merged changes, producing release candidates, running preflight on pull requests, analysing code — applies to a branch only once codev is tracking it.

Every project tracks **`main`** by default. You track additional branches when you have long-lived branches — release branches, or a branch that a parallel effort lives on — that need the same automation as trunk.

<figure><img src="/files/dS0X5Uo7inm1ffwZuxcx" alt="Create New Project panel with the Branches to track selector"><figcaption><p>Branches to track are chosen when you set up the project — <code>main</code>, plus any long-lived release branches.</p></figcaption></figure>

## What tracking a branch does

Once codev tracks a branch, that branch takes part in the normal pipeline:

| Area                   | On a tracked branch                                                                                                                        |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Builds**             | A merge builds the affected packages and deploys them to the environments that track the branch, then rolls them into a release candidate. |
| **Release candidates** | The branch gets its own candidates, shown under its own tab on the **Release Candidates** page.                                            |
| **Preflight**          | codev runs preflight for the branch, so pull requests targeting it are analysed.                                                           |
| **Code analysis**      | Scheduled code analysis covers every tracked branch, not just `main`.                                                                      |
| **Changesets**         | A changeset pull request can only target a tracked branch.                                                                                 |

An untracked branch is inert to codev — merges and pull requests on it do not build, produce candidates, or run analysis.

## Choosing branches to track

You pick the branches to track when you set up the project, under **Branches to track** — typically `main` plus any long-lived release branches. See [Getting started](/flxbl/codev/ci-cd/getting-started.md) for the full project-setup flow.

## Tracking another branch later

You do not have to decide every branch up front. To start tracking a branch after setup, open **Settings > Projects**, select the project, and add the branch to its tracked branches. Only project owners can change project settings.

codev then runs **preflight** for the new branch and starts including it in scheduled **code analysis**; from that point the branch behaves like any other tracked branch — merges build, produce candidates, and deploy to the environments that track it.

{% hint style="info" %}
Track branches deliberately. Every tracked branch adds build, candidate, and analysis work, and keeps accumulating integration cost for as long as it lives. Track the long-lived branches you actually operate — trunk plus release branches — not every branch in the repository.
{% endhint %}

## Tracked branches and branch operations

Tracked branches are the foundation the other branch operations build on:

* [Cascades](/flxbl/codev/branch-operations/cascades.md) connect two or more long-lived tracked branches and automate the integration between them.
* [Cherry-to](/flxbl/codev/branch-operations/cherry-to.md) delivers a pull request's change onto another branch — usually a tracked release or staging branch, so the delivery merges and builds like any other change there.
* [Unbundle](/flxbl/codev/branch-operations/unbundle.md) rebuilds a release candidate on a tracked branch without a change you remove.

## Related

* [Getting started](/flxbl/codev/ci-cd/getting-started.md) — choosing branches to track during project setup
* [Cascades](/flxbl/codev/branch-operations/cascades.md) — automate integration between long-lived branches
* [Release candidates](/flxbl/codev/ci-cd/overview-2.md) — the candidates a tracked branch produces
* [Environments](/flxbl/codev/environments/environments.md) — how an environment tracks a branch to receive its builds


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/codev/branch-operations/tracking-branches.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
