Platform.sh User Documentation

Change an environment’s parent

Try for 30 days
Flexible, version-controlled infrastructure provisioning and development-to-production workflows
Activate your trial

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

If you’re not using a source integration, you can also set a parent for your environment when pushing changes to it. To do so, run the following command:

git push -o "environment.parent=PARENT_ENVIRONMENT_NAME"

Learn more about how to trigger actions on push.

Is this page helpful?