forest switch
Switch your active branch in your local development environment. The active branch determines which layout configuration your Development Environment uses.
Usage
forest switch [BRANCH_NAME] [options]
Arguments
| Argument | Description |
|---|
BRANCH_NAME | The name of the branch to switch to (optional, omit for interactive selection) |
Options
| Option | Description |
|---|
--help | Display usage information |
Interactive selection
If you omit the branch name, the CLI presents an interactive list of available branches:
$ forest switch
? Select the branch you want to set as current:
❯ feature/add-new-smart-view
hotfix/fix-dropdown-issue
feature/implement-refund-action
Direct switch
Provide the branch name directly to switch without the interactive prompt:
$ forest switch feature/add-new-smart-view
✅ Switched to branch: feature/add-new-smart-view
You cannot switch to the branch that is already active.
Examples
# Interactive branch selection
forest switch
# Switch to a specific branch
forest switch feature/customer-export
# Switch to main development branch
forest switch main-feature
After switching
After switching branches, your Development Environment will reflect the layout of the new branch. If your local agent is running, restart it to ensure it picks up any environment variable changes.
If your Forest UI does not update after switching branches, try refreshing your browser.