
# Branches and environments

Use environments to deploy more than one branch of a service.

## Add an environment

1. Open the project and service.
2. Choose the dashboard action to add a branch or environment.
3. Select the repository branch.
4. Review deployment configuration and variables.
5. Start the agent-first setup or deployment flow shown by the dashboard.

Each environment receives its own identifier and can have separate resources, domains, build history, variables, and usage.

## Before adding a branch

- Ensure the branch exists in the connected provider.
- Add environment-specific secrets.
- Confirm the root directory if branch layout differs.
- Avoid pointing two production domains at different environments unintentionally.

Creating environments and some environment operations can be restricted during the free trial.
