Change an environment’s parent

All environments default to having another environment as their parent. If you branched the environment from another, its parent starts as the environment it was created from. If you pushed a branch through Git or a source integration, the parent defaults to the default environment.

To change the environment’s parent, follow these steps:

  • Select the project where you want to change the parent.
  • From the Environment menu, select the environment you want to change.
  • Click Settings.
  • In the row with the environment’s name, click Edit .
  • Select a Parent environment.
  • Click Save.

Run the following command:

platform environment:info -e <CHILD_ENVIRONMENT_NAME> parent <PARENT_ENVIRONMENT_NAME>

So if you have the environment new-feature and want to change its parent to main, run the following:

platform environment:info -e new-feature parent main