> 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/sync.md).

# Sync

Where the other branch operations move a *change* between branches, **Sync** moves the *state of a branch onto an environment*. It deploys a pull request's current state to an environment on demand — straight from a comment on the PR — without waiting for a merge, a build, and a release.

<figure><img src="/files/1HayYplf8UseZvaKVOq9" alt="Available sync commands posted on a pull request"><figcaption><p>codev posts the sync commands on every pull request.</p></figcaption></figure>

There are two forms, for two situations:

| Command                         | What it does                                                                         | Approval                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| **Sync review environment**     | Brings this PR's own **review environment** up to the full PR branch state.          | Not required — the blast radius is your own PR.                    |
| **Sync to a named environment** | Deploys this PR's changes to a **named, shared** environment (e.g. `qa`, `staging`). | Required — a shared environment is the exception, not the default. |

Reach for the review environment first; treat syncing to a shared environment as the exception, since it puts unmerged code where other people test and can make the environment drift from what the release process says is deployed there.

Full setup, the exact commands, approval behaviour, and guidance on when to use each form are in [Syncing Environments](/flxbl/codev/ci-cd/sync.md).

## Related

* [Syncing Environments](/flxbl/codev/ci-cd/sync.md) — the full reference for both sync forms
* [Environments](/flxbl/codev/environments/environments.md) — how an environment tracks a branch
* [Tracking additional branches](/flxbl/codev/branch-operations/tracking-branches.md) — which branches codev builds and deploys


---

# 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/sync.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.
