This article provides a solution for the issue where new environments are placed under the production environment on Magento Commerce Cloud when pushed from the git version-control system.
Affected products and versions
- Magento Commerce Cloud, all supported versions .
Steps to reproduce:
Prerequisites : 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 was created under the production branch.
The new branch is created under the staging 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 DevDocs Magento Commerce Cloud > Bitbucket integration .
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.