Skip to main content
A branch is a private copy of a Site with its own link. You publish your changes to it, check them at its link, and then promote it to make it the Site’s live version. Visitors don’t see anything on a branch until you promote. Every Site can have staging, the first branch. With several branches turned on, you can also make named branches beside it, such as holiday-homepage. A new branch starts from the live Site or from another branch. Everyone who can edit the Site shares its branches. Mist shows a Site’s branches in the Source Control panel. Mist 1.47.0 calls the panel Staging.

Before you start

  • Site branches or staging turned on for your company. Fluid turns them on for each company. Site branches turns staging on by itself. Until one is on, Mist doesn’t show Source Control for a Site. To ask for it, contact support.
  • Site branches turned on for several branches. With only staging, a Site has one branch, and Mist shows no Live row, New branch or Delete branch.
  • Mist 1.49.0 or later. Mist 1.47.0 lets you pick a branch to switch the folder to. Mist 1.49.0 adds the Source Control name, Start from, Promote anyway, Ask Mist to resolve, Delete branch in a branch’s row, Copy live’s data and the database confirmation of an undo. Mist updates itself; restart it to get the latest version. See Download Mist.
  • Permission to edit the Site. On a company Site, you make and delete branches as a company admin.
  • The Site open in Mist, with its folder on your computer. See Run and publish.
Mist keeps one folder for each Site. With several branches, the branch you pick is checked out in that folder: its files replace the ones you were looking at, and Publish and Promote to live go to it. You can also pick the Live row to go back to the live Site.

Open the Source Control panel

Open the Site in Mist’s Site editor. In the right rail, click Source Control, the branch icon. The panel has a Branches list on top. Below it, a card for one branch shows its link and the actions below. If the Site has no staging yet, the panel says No staging yet and shows Make staging. With several branches, it also shows New branch. Click Make staging to make staging.

Make a branch

1

Click New branch

At the bottom of the Branches list, click New branch.
2

Name it

Type a name, such as holiday-homepage. Use lowercase letters and digits, with single hyphens between them, at most 40 characters. Mist says what’s wrong with a name before it asks Fluid.
3

Choose where it starts

Once the Site has a branch, Start from appears under the name. It lists Live site and each branch. It starts on the branch your folder is on, or on Live site when the folder is on the live Site. Mist says what the choice means under the list.
4

Click Make branch

The new branch appears in the list. Its state shows nothing when it’s ready, or Setting up for a moment. When it’s Setting up, click Check again.
A branch made from Live site starts as the live Site is published now. A branch made from another branch starts as that branch was last published, with its files, its database tables and no rows, and its history. Changes in your folder that you haven’t published aren’t in it, so publish the branch first. Settings set only on that branch aren’t copied. Set them again on the new branch. See Start from another branch. A branch made from another is still a branch of the Site. You promote it to live, never into the branch it started from. Live changed compares a branch with the live Site only. Mist says why when a branch can’t be a source, and no branch is made. It happens when the branch is still being set up or has nothing published, when its database is being changed, or when it was published without its source. Fix what the message says, or start from Live site. A branch made before branches had their own source can’t be a source. Start from Live site, or delete that branch and make it again from live. main, live, production and master are kept for the live Site. A Site holds a limited number of branches, staging included. When it’s full, Mist shows Fluid’s message, “This site already has 10 branches; delete one first”. Delete a branch you don’t need. A branch of a Site with a database gets its own database, with the tables of what it started from and no rows. Promoting never moves its rows to the live Site. To start over, or to test with live’s rows, see Reset a branch’s database.

Pick a branch

The Branches list starts with the Live row, the published site, then staging, then the other branches. Each branch row shows who made it. A row can show a state: Click a row to switch the folder to it.
  • Mist saves your edits on the branch you leave, so nothing is lost. It says so: “Your edits to … were saved on it.”
  • It checks out the one you picked, with what was saved to it since. The card shows Checked out in this folder.
  • If the branch needs other packages, Mist installs them. If that fails, Mist says so, and Run shows what the install says.
  • If the preview was running, Mist restarts it. Each branch has its own local database, so the preview shows that branch’s rows, and your local rows from one branch never appear on another. See Work with branches.
  • If a file changed both here and on the branch, it’s left with conflict markers. Mist asks you to resolve them before you publish.
A switch never publishes. While the folder is on the live site, a note under the list says so: “This folder is on the live site. Switching to a branch saves your edits here on live and shows that branch’s files instead.” Mist refuses a switch while an earlier merge is unfinished, or while conflicts from an earlier update or switch haven’t been published. It says why.
1

Make your changes

Change the Site in the chat or in your files.
2

Publish to the branch

In the branch’s card, click Publish to and the branch’s name, such as Publish to staging. The live Site doesn’t change.
3

Open the link

In the card, click Open to check the branch, or Copy link to send it to a teammate.
Only people who can edit the Site can open a branch’s link. When the folder is on a branch, the Publish button at the top of the preview publishes to that branch too. Mist then says Published to the branch’s name, that the live Site didn’t change, and shows the branch’s link. It doesn’t say “Site published”. If a destructive change needs your yes, the question names the branch: Publish to the branch with a change that deletes data? Publish, Update from live and Promote to live work on the files in the folder. When the folder is on another branch or on the live Site, the card says “This folder is on …. Switch to … to publish, update or promote it.” and shows Switch to the branch’s name. Click it, then publish. If a destructive change in the Site’s database schema needs your yes, Mist lists it and asks before it publishes. See Make a destructive change.

Bring live changes in

When the Site has published since the branch was made or last updated, the card shows a Live changed section with Update from live, and Promote to live is off.
1

Click Update from live

Mist merges live’s changes into your folder. Your own changes stay.
2

Resolve any conflicts

A file changed on both sides keeps both versions between <<<<<<< and >>>>>>> markers. The card lists each file under Resolve conflicts. With several branches, Mist hands the conflicts to the chat, and the strip says it is resolving them. See Let Mist resolve conflicts. You can also fix the markers yourself: each file has an Open button, and How to resolve tells you what to do. Then click Check again. Publish stays off while a file has markers.
3

Check the schema

With several branches, once no conflicts are left, Mist asks Fluid whether db/schema.json plans on the branch’s database and on live’s. Click Check schema if the card asks for it, and read the answer: Schema check passed, Schema problem or Schema not checked. Click Check again after you change the file.
4

Publish to the branch

Click Publish to the branch, so its published version holds live.
db/schema.json lists migrations. When two branches add migrations, keep live’s first, in live’s order, then your branch’s own, in your branch’s order. Keep each migration once. If both sides changed one with different steps, give your branch’s migration a new id. See The migration merge rule. A file one side deleted has no markers. Settle it in the folder: git add keeps it, and git rm removes it.

Let Mist resolve conflicts

With several branches turned on, an Update from live or a switch that leaves conflicts sends them to the Site’s chat. The strip says Mist is resolving the conflicts, keeping both sides’ changes where it can. Nothing is published. Mist keeps both sides’ changes wherever they don’t collide. Where both changed the same thing, it picks the version that fits your change and tells you what it chose and why. It follows the db/schema.json rule above for that file, and stages each file it fixes. Mist never publishes, promotes or switches branches while it resolves. Those stay your clicks. The card clears Resolve conflicts once the files are settled. If the chat can’t take the turn, or Mist stops before it finishes, the strip says Conflicts still need resolving. Click Ask Mist to resolve in the Resolve conflicts card to send it again, or fix the markers yourself. This works with the folder on the live Site or on one of the Site’s branches. A Site with only staging, or a folder on a git branch of your own, keeps the manual steps.

Promote a branch to live

1

Click Promote to live

It’s available once the branch is published and holds what’s live. Mist asks you to confirm and says what’s live now is replaced by the branch’s published version. Click Promote.
2

Confirm a change that deletes data

If the branch’s version drops or renames a table or column, Mist lists it and asks Promote with a change that deletes data? Nothing has been promoted yet. Click Apply and promote to go on.
When it’s done, the card says the branch is live and shows the live version. The branch’s rows don’t move to the live Site.

Promote anyway

Mist checks that the branch holds everything that’s live. It can’t when live’s current version has no saved source. That happens when live was published without its source, such as with --no-source, by a deploy through the MCP server, or before Fluid saved each version’s source. Nothing is promoted, and when Fluid allows it, the card asks Promote without a check against live? The card says that Fluid can’t check that the branch has everything on live, that promoting replaces live with the branch, and that anything on live that isn’t in the branch will be gone. You can undo the promote. Click Promote anyway to go on, or Cancel to leave live as it is.
  • Everything else is still checked. The branch’s own version must have a saved source, the Site’s source can’t be ahead of the branch, and the schema is checked. A destructive change still asks its own question.
  • Undo works. The version live had before is the one an undo puts back. See Undo a promote.
  • If another version went live meanwhile, Mist asks again about the one that is live now.
When Fluid doesn’t offer it, Mist shows steps instead. With the folder on a branch, they are: pick Live in the Source Control panel, click Publish to save live’s source, pick the branch again, click Update from live and Publish to the branch, then promote again. That publish sends the folder’s live copy as it is. If live was last changed by an MCP deploy, check the live preview first so nothing is lost. See Promote over a live version with no saved source.

Undo a promote

Click the ⋯ menu in the branch’s card, then Undo promote, then Undo to confirm. The version that was live before the promote goes live again, and the branch doesn’t change. Undo promote is in the menu while the promoted version is still live. If another version goes live, Mist doesn’t offer it, so an undo never removes a later change. Fix forward with a new publish instead. If the promote changed the Site’s database, going back may have to change it too. Then Mist stops and asks Roll back the database too? It lists what the database would change, newest first, and what data is lost. Nothing has changed yet. Click Roll back the database to go on, or Cancel. Cancel leaves the Site on the version it served. If the database changed since Mist showed you the steps, Mist says so and shows the new steps. If the database step is unfinished, Mist shows Database step unfinished with Finish the undo. This card is in Mist 1.49.0 and later. An undo is refused when the promote changed the database in a way Fluid can’t reverse. See Undo the database change for what an undo reverses and what data it loses. After an undo, Update from live on the branch you promoted asks Keep this branch’s changes? Click Keep this branch’s changes to keep your files and record the restore as merged, or Take live’s version to take the rolled-back version.

Reset a branch’s database

With several branches turned on, the card’s ⋯ menu has Reset database. It gives the branch live’s tables and no rows, and its own rows are lost. When Fluid allows it, Copy live’s data also gives the branch live’s current rows. Mist asks first. The question says people who can edit the Site may see the copied rows, and the branch’s database is unavailable until the copy finishes. Fluid runs it in its next database run, within about 15 minutes plus the copy time. If the copy can’t be made, Mist says Live’s data wasn’t copied, and the branch gets live’s tables with no rows. See Copy live’s rows into a branch for who may do it and the limits.

Delete a branch

With several branches turned on, you can delete a branch from the Branches list or from its card.
  • From the list: click the ⋯ at the end of the branch’s row, then Delete branch….
  • From the card: click the ⋯ menu in the card, then Delete branch.
Then click Delete. The branch and its Site are deleted. The live Site doesn’t change. When your folder is on that branch, Mist can’t delete it from under the folder. It asks Switch to Live and delete the branch’s name instead. Mist saves your edits as a commit on the branch, switches the folder to the live Site, and then deletes the branch. That commit goes with the branch unless you published or promoted it, so the question warns that unpublished edits are deleted. If the switch leaves conflicts, Mist deletes nothing. Resolve them, then delete the branch. A branch that another branch is still being made from can’t be deleted until the new branch is finished. Wait for it, or delete the new branch first.

Branches Mist makes

Mist can run fluid sites branch commands in the Site’s folder when you ask it to. After a fluid command runs there, even one that stopped on conflicts, the Branches list reads the Site again. So a branch Mist made shows without a reload.

Troubleshooting

Email Fluid support at help@fluid.app. The Getting help page lists what to include in your request.