# set-origin

{% hint style="success" %}
This is the official documentation of the `@forestadmin/agent` Node.js agent.
{% endhint %}

The `forest set-origin` command enables you to change the origin of a branch.

```
$ forest push --help
Set an environment as your branch's origin. Your branch will build on top of that environment's layout.

USAGE
  $ forest set-origin [ENVIRONMENT_NAME]

ARGUMENTS
  ENVIRONMENT_NAME  The environment to set as origin.

OPTIONS
  --help                         Display usage information.
```

The layouts of your branch will be refreshed based on the new origin Environment.

{% hint style="success" %}
Your branch layout changes that are relevant will be applied on top of the new origin Environment layouts.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.forestadmin.com/developer-guide-agents-nodejs/deploying-to-production/forest-cli-commands/set-origin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
