Branches

What a branch is, when to make one, the three kinds (ordinary, isolated and scratch), and how branches fit around your live app.

A branch is a separate copy of your project with its own code, its own copy of the database and its own copy of every key. Change it as much as you like: your live app and its data stay as they are until you merge the branch back.

When to use a branch

  • A bigger change on a live app. Build a new feature, a redesign or a database change on a branch, check it in the branch's preview, then merge it into main in one step.
  • Several people, or several AI agents, at once. Each works on a branch of their own, and the merges bring the work together.
  • Work that must not touch real users or data. An isolated branch has no real rows, no real keys and no way to send real email.
  • A test, a rehearsal or a backup copy. A scratch branch is made to be thrown away.
  • Data from the past. A branch can start from the database as it was at a date and time, to look at or recover rows that were changed since.

Main and its branches

Every project has a main: the project you made first, whose published app is your live app. A branch can be made from main or from another branch. The branch switcher beside the project name in the editor lists them; pick one to open it, or open Branch Reviews to see every branch, its status and what it changes.

The branch's own
Its code, its database (a copy, made when the branch is made), its keys, its stored files, its chat, its checkpoints, its settings and its published address. Nothing you do there changes main.
What reaches main
Only what a merge carries: the code, plus what the merge review lists (new env vars, images and files the code uses, app connections, a few settings). Database changes reach main only through the branch's migration script.
Kept on main only
Database backups and restore, preview values for keys, Send project, the template link and Duplicate. On a branch, these screens say so and link to main.

Three kinds of branch

KindStarts withCan be mergedUse it for
OrdinaryThe code, and the data you choose: a full copy, the same tables with no rows, or the data as it was at a momentYesFeatures and fixes that will go live
IsolatedThe code, the same tables with no rows, and test keys onlyYesAgents, contractors and risky changes that must not reach real users, mail or data
ScratchEither of the aboveNoQA runs, migration rehearsals, a backup copy of the data. Deleted after 7 days without use unless kept

Scratch can be combined with isolated. A branch made from an isolated branch is isolated too, and a branch made from a scratch branch is scratch too.

Scratch branches

Turn on Scratch branch in New branch, or ask your assistant for a scratch branch. A scratch branch cannot be merged from, so nothing on it reaches main by accident, but you can merge into it. It is deleted 7 days after it was last edited, opened or commented on, unless you click Keep in Branch Reviews. Make ordinary on its page turns it into a branch that can be merged and is no longer deleted for being idle; Make scratch on an ordinary branch does the reverse. A scratch branch counts toward your plan's branch limit like any other.

The usual flow

  1. 1

    Make a branch

    In the editor with New branch…, or by asking your assistant. See Make a branch.

  2. 2

    Build and test on it

    Work on the branch as on any project. Its preview runs on the branch's own data and keys, and you can publish it to its own address to try it like the real thing. See Testing on a branch.

  3. 3

    Merge it

    Merge in the top bar opens the merge review: the files, the database changes, the keys and everything else the merge will do. Floot checks the merged code before anything changes. See Merge a branch.

  4. 4

    Publish main

    A merge changes main's code, not the live app. Publish main when you are ready for people to see it.

Branches and your plan

Free projects can have 1 open branch, Pro projects 5, and Power projects as many as they need. See Branch limits and cost.