This section is about code branches. They are not the same as environments, which branch your project’s backend data and configuration. The two work together. See Branches and environments below.
What has branches
Each part of your app that is stored as code has its own set of branches.
The branches of the Frontend and of each service are independent. Creating a branch in the Frontend does not create one in a service, and the other way around. You can be on
main in the Frontend and on fix-prices in a service.
Key concepts
- Branch. A version of the code of one part of your app. A new branch starts as a copy of the branch you create it from, at its latest commit.
- Default branch. The branch every part starts with. You can change which branch is the default. See Change the default branch.
- Protected branch. A branch where nobody writes directly: not the chat, not the code editor, not the visual editor. Changes reach it only through a merge. No branch is protected when it is created. See Protected branches.
- Pull request. A proposal to merge one branch into another, with a place to review, comment, and resolve conflicts. See Pull requests.
- Commit. A saved point in the history of a branch.
- Environment. Where deployed code runs and where your data lives, such as
masterorstaging.
Branches and environments
This is the most important distinction in this section.- Branches isolate code. Changing a file on a branch does not change any other branch.
- Data lives in environments, and every branch connected to an environment shares it. A table, its rows, and its schema belong to an environment such as
master. If you change a table while you work on a branch, the change applies to that environment’s data, and every branch connected to that environment sees it.
For a side-by-side comparison, see Environments and code branches.
The chat asks for confirmation before it changes a table from a branch other than the default. See The chat and branches.
Publishing and deploying also depend on environments. You publish the Frontend from a branch and a commit, and you deploy a service from a branch and a commit to an environment. See Previews, sharing, and publishing.
What a merge does not do
A merge, including the merge of a pull request, only moves code between branches. It never publishes your site and never deploys a service. After a merge, you publish the Frontend with Publish and deploy a service with Deploy.A typical flow
- Create a branch from the default branch, for example
new-pricing-page. - Work on it with the chat, the code editor, or the visual editor. Everything is saved to that branch, and the preview shows it.
- Share a preview link if you want feedback before you merge.
- Open a pull request into the default branch and get it reviewed by people, by Archie Reviewer, or both.
- Merge. The default branch now contains your changes. Nothing is live yet.
- Publish the Frontend or deploy the service when you decide to.
Guides
Working with branches
The branch menu, creating, switching, and deleting branches, and the Manage branches panel.
Protected branches
What protection blocks, how to keep working, and protection rules.
Pull requests
Open a pull request, request reviews, resolve conflicts, and merge.
Archie Reviewer
The AI reviewer: when it runs, what it checks, and what it consumes.
Previews, sharing, and publishing
Per-branch previews, share links, and publishing the Frontend.
The chat and branches
Where the chat writes and what it asks before it writes.
Permissions
What Owners, Admins, Editors, and Viewers can do.
FAQ and troubleshooting
Common questions and what the messages mean.