Step 5, Clone or branch an environment

Now that you’ve changed the Magento Admin variables, you should create a new environment for your development work; this new environment inherits the variable values from master.

After you create the branch, update project dependencies so you can install the Magento software locally.

  1. Do any of the following:

    • To create a new environment, enter the following command:

      magento-cloud environment:branch <environment name> <parent environment ID>
      
    • To check out an existing environment, enter the following command:

      magento-cloud environment:checkout
      

    For example, to create a new branch named sprint1 from master, enter

        magento-cloud environment:branch sprint1 master
    
  2. After the command completes, update dependencies:

    composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader
    
  3. Create a snapshot of the environment.

    magento-cloud snapshot:create -e <environment ID>
    

Next step

Step 5, set up authentication keys