Using branches
Last updated
Was this helpful?
Last updated
Was this helpful?
As we've explained in the previous page, your Admin panel's frontend is saved on Forest Admin servers. As a result, you can't version it. But don't worry, we've got you covered with some great tools!
The notion of a branch cannot be explained without first explaining what a layout is.
A layout is all the settings that define your user interface (UI). In Forest Admin, there is 1 layout per environment and per team:
A branch is a fork (i.e copy) of the layout of its origin environment. It is attached to your development environment.
Once you've created a branch, your layout will look exactly like the layout of its origin environment.
Any layout change you make on your current branch using the Layout Editor ↗ will be saved on your current branch and will not affect its origin environment.
Imagine the following situation where you have 3 environments:
The branch my-branch
is based on the production layout. Any changes made to it are saved in your branch's layout and can later be applied to it.
This also means that any changes made to the origin of your branch will instantly reflect on your branch.
For those familiar with git's rebase, this means you will never have to rebase your branch on its origin.
To create a branch, you'll need to use Forest CLI. Make sure you've created your local development environment using the init command. Then, to create a branch named my-branch
based on your production
environment, simply run:
To learn more about the branch
command, please visit this page.
On your interface, you can check at all times what branch you are on and how many layout changes were made: they appear in the top banner. The X branches pushed
information is relevant for remote environments only: it shows how many branches were already pushed onto it.
Your current branch will be displayed at the top.
Now that you've mastered branch creation and management, let's dive into the next step of the development workflow: deployment.