> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forest.app/llms.txt
> Use this file to discover all available pages before exploring further.

# forest set-origin

> Change the origin environment of your current branch

# forest set-origin

Set an environment as the origin of your current branch. The branch then builds on top of that environment's layout, and [`forest push`](https://docs.forest.app/reference/cli/push) targets it.

## Usage

```bash theme={null}
forest set-origin [ENVIRONMENT_NAME]
```

`forest branches:origin` is an alias of this command.

## Arguments

| Argument | Description |
| - | - |
| `ENVIRONMENT_NAME` | Name of the environment to set as origin. Omit it to pick from the remote and production environments |

## Options

| Option | Description |
| - | - |
| `--help` | Display usage information |

The command acts on the current branch of your development environment, identified by `FOREST_ENV_SECRET` when it is set.

## Examples

```bash theme={null}
# Pick the origin interactively
forest set-origin

# Build the current branch on top of staging
forest set-origin staging
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.