branch
Last updated
Was this helpful?
Last updated
Was this helpful?
Please be sure of your agent type and version and pick the right documentation accordingly.
This is the documentation of the forest-express-sequelize
and forest-express-mongoose
Node.js agents that will soon reach end-of-support.
forest-express-sequelize
v9 and forest-express-mongoose
v9 are replaced by v1.
Please check your agent type and version and read on or switch to the right documentation.
The forest branch
command is at the center of what your Forest Admin development workflow should look like. As explained on , it allows you to manage your UI, a bit like you would use git's branches for your code.
Here are a few extra details on how it works.
The forest branch
command has 3 uses, depending on how you use it:
List branches
Create branches
Delete branches
To list your existing branches, simply omit any argument to the command:
To create a new branch, append the name of the branch you wish to create after forest branch
, like so:
There is no specific constraint on branch names, though kebab-case is generally used.
However, keep in mind that your branch name must be unique in the project.
Note that your project must be deployed remotely before you can start using branches:
To delete a branch, simply add the -d option and a branch name to the forest branch
command:
Any branch reflects LayoutChange(s)
(i.e. changes in your UI) that you've made on that branch: to make this possible, a branch needs an origin, which is the state of the layout you started from and made those LayoutChange(s)
on. This is why you need to (ideally) or simply a remote environment: those environments can serve as origin to your branches.