AD0-E724 · Question #25
A developer wants to create a new development environment named 'feature-xyz' based on the existing 'staging' environment. Which 'magento-cloud' CLI command accomplishes both creating the Git branch a
The correct answer is A. 'magento-cloud environment:branch feature-xyz staging'. Option A is correct because magento-cloud environment:branch is the purpose-built command that simultaneously creates a new Git branch and provisions a corresponding cloud environment, with the syntax environment:branch <new-name> <parent> - making feature-xyz a child of staging.
Question
A developer wants to create a new development environment named 'feature-xyz' based on the existing 'staging' environment. Which 'magento-cloud' CLI command accomplishes both creating the Git branch and provisioning the new cloud environment?
Options
- A'magento-cloud environment:branch feature-xyz staging'
- B'magento-cloud git:branch feature-xyz staging'
- C'magento-cloud environment:create --name feature-xyz --parent staging'
- D'magento-cloud new:environment feature-xyz --from staging'
How the community answered
(63 responses)- A76% (48)
- B14% (9)
- C3% (2)
- D6% (4)
Explanation
Option A is correct because magento-cloud environment:branch is the purpose-built command that simultaneously creates a new Git branch and provisions a corresponding cloud environment, with the syntax environment:branch <new-name> <parent> - making feature-xyz a child of staging.
- B is wrong because
git:branchis not a validmagento-cloudsubcommand; it conflates the nativegit branchcommand with the cloud CLI. - C is wrong because
environment:createdoes exist, but it provisions an environment from an already-existing branch - it does not create the Git branch itself, so it's a two-step process, not one. - D is wrong because
new:environmentis not a realmagento-cloudcommand; the--fromflag is invented and doesn't exist in the CLI.
Memory tip: Think of environment:branch as doing double duty - like git checkout -b, it handles both the branch and the environment in one shot. If you see a command that sounds like it only touches Git (git:branch) or only sounds like infrastructure (environment:create), it's doing half the job.
Topics
Community Discussion
No community discussion yet for this question.