Upsun User Documentation

Change an environment’s parent

Try Upsun for 15 days
After that, enjoy the same, game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
¹Terms and conditions apply
Activate your 15-day 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:

upsun 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:

upsun 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?