Development Environments

Merge into production

Now that you've had the chance to verify that your application built and deployed correctly on your development environment, you're ready to merge it into your production site. Platform.sh provides snapshot features that protect against any unforeseen consequences of your merges, keeping a historical copy of all of your code and data.

</asciinema-player>

Note: The --project flag is not needed if you are running the platform command from within your local repository.

  1. Create a snapshot

    Before you merge the dev feature into master, create a snapshot of the master environment. The snapshot will preserve both the code and all of its data.

     platform snapshot:create --project <project id>
    

    Select master as the environment you want to back up.

  2. Merge feature into production

     git checkout master
     git merge dev
     git push
    

    When the build process completes, verify that your changes have been merged.

     platform url
    
  3. Restore a snapshot

    If you would like to restore the code and data to the time of your snapshot, use the command

     platform snapshot:restore --project <project id>