branch
The forest branch command is at the center of what your Forest Admin development workflow should look like. As explained on this page, it allows you to manage your UI, a bit like you would use git's branches for your code.
1
$ forest branch --help
2
Create a new branch or list your existing branches.
3
4
USAGE
5
$ forest branch [BRANCH_NAME]
6
7
ARGUMENTS
8
BRANCH_NAME The name of the branch to create.
9
10
OPTIONS
11
-d, --delete Delete the branch.
12
--force When deleting a branch, skip confirmation.
13
--help Display usage information.
14
--projectId=projectId The id of the project to create a branch in.
Copied!
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

Listing existing branches

To list your existing branches, simply omit any argument to the command:
1
$ forest branch
2
feature/new-button < current branch
3
fix-missing-label
4
feature/remove-tooltip
Copied!
< current branch indicates your currently selected branch: your project's UI will locally display according to this branch's layout settings.

Creating a new branch

To create a new branch, append the name of the branch you wish to create after forest branch, like so:
1
$ forest branch feature/new-ops-feature
2
✅ Switched to new branch: feature/new-ops-feature
Copied!
There is no specific constraint on branche 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:
1
$ forest branch add-refund-action
2
❌ You cannot create a branch until this project has either a remote or a production environment.
Copied!
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 have a production environment (ideally) or simply a remote environment: that environment will serve as origin to your branches.

Deleting a branch

To delete a branch, simply add the -d option and a branch name to the forest branch command:
1
$ forest branch -d hotfix/fix-dropdown-issue
2
[? Delete branch "hotfix/fix-dropdown-issue"? Y
3
✅ Branch hotfix/fix-dropdown-issue successfully deleted.
Copied!
You will be prompted for confirmation before deleting a branch. To skip that confirmation, use the --force option.
Last modified 6mo ago