Skip to content

How-to Guides

Technical References

Code Review /

Code moves up; content moves down

When thinking about develop environments and their relationship to production environments, think of the code separately from the content in the database, because they move through environments in opposite directions. Best practice dictates that code moves up; content moves down.

Content moves downward (developproduction) because the production database is the authoritative source of content and where the most current content changes are saved. This one-way movement of content protects the production database from being overwritten and losing data.

Code, on the other hand, moves upward (developproduction) because we want to be certain new code is free from errors and will work as expected before deploying it to the production environment.

Deployment workflow

It’s up to your team to decide how best to integrate these environments into your workflow. One suggested workflow is as follows:

  1. Jane switches to the develop branch in their local environment.
  2. Jane writes code to build a new feature in their local environment.
  3. When ready, Jane uses git push to send the changes to the remote develop branch.
  4. Jane tests the new feature in the develop environment.
  5. Everything looks good, so Jane pushes the changes to a new (temporary) branch (add/new-feature).
  6. Jane creates a PR (pull request) against master.
  7. The new code shows up in VIP’s Review Queue, is reviewed, and then approved.
  8. Jane merges the PR to master.

Last updated: November 20, 2020