This article provides a solution for the issue where new environments are placed under the production environment on Adobe Commerce on cloud infrastructure when pushed from the git version-control system.
Have a local git controlled clone of the project.
Steps to reproduce:
You need to create an integration branch from the staging branch:
git checkout staging
git checkout -b <branch>
git push --set-upstream origin <branch>
The new branch is created under the staging branch.
The new branch was created under the production branch.
This is not a bug. For setting a parent branch for another branch, the merchant should use the magento-cloud CLI.
A parent branch can only be set after the merchant has pushed a newly created branch and activated it. Refer to Adobe Commerce on cloud infrastructure > Bitbucket integration in our developer documentation.
To update a parent for the existing branch on the server, please use the
magento-cloud environment:info command in the magento-cloud CLI.
Example of usage:
magento-cloud environment:info parent Staging
This will set the parent branch to “Staging” for the currently checked out branch.