Skip to main content

forest push

Push the layout changes of your current branch to its origin environment. This applies your branch’s UI changes to a remote environment (such as staging), making them visible to users of that environment.

Usage

forest push [options]

Options

OptionDescription
--forceSkip push confirmation
-p, --projectIdThe ID of the project to push to
--helpDisplay usage information

How it works

When you run forest push, your branch’s layout changes (noted Δ) are applied to the branch’s origin environment:
my-branch (Δ) ──push──► Staging (origin)
The layout changes are moved from your branch to the origin environment. Other users of that environment will immediately see the updated layout.
Pushing your branch to its origin environment will delete the branch automatically. Make sure your changes are ready before pushing.

Pushing changes

Run forest push from your project directory:
$ forest push
? Push branch my-current-branch onto Staging (Y|n): Y
 Push successful.
You will be prompted to confirm before the push is applied. To skip the confirmation:
forest push --force

Push vs. deploy

forest push and forest deploy are distinct commands with different purposes:
CommandTargetEffect
forest pushNon-reference environments (e.g. staging)Applies layout changes to a remote environment; deletes the branch
forest deployReference environment (e.g. production)Permanently applies layout changes to production
You cannot push to the Production (reference) environment. Use forest deploy for production changes.

Pushing from the UI

You can also push layout changes directly from the Forest UI. When a remote environment has unpushed changes, a banner appears at the top with a “Push to …” link.
Push from the UI is only available for remote environments whose origin is not the reference environment.

Examples

# Push with confirmation prompt
forest push

# Push without confirmation
forest push --force

# Push in a specific project
forest push --projectId 42