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.
Affected products and versions
- Adobe Commerce on cloud infrastructure, all supported versions.
Have a local git controlled clone of the project.
You need to create an integration branch from the staging branch:
- Switch to the staging branch by running the following command in the local shell:
git checkout staging
- Create an integration branch from the staging branch by running the following command in the local shell:
git checkout -b <branch>
- Push the branch to the remote repository and set up an upstream branch by running the following command in the local shell:
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.
- Adobe Commerce on cloud infrastructure > magento-cloud CLI in our developer documentation.