nerdexam
Adobe

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.

Setup and Configuration

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)
  • A
    76% (48)
  • B
    14% (9)
  • C
    3% (2)
  • D
    6% (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:branch is not a valid magento-cloud subcommand; it conflates the native git branch command with the cloud CLI.
  • C is wrong because environment:create does 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:environment is not a real magento-cloud command; the --from flag 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

#magento-cloud CLI#environment branch#cloud environment#environment provisioning

Community Discussion

No community discussion yet for this question.

Full AD0-E724 Practice