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 (
production) 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 (
production) because we want to be certain new code is free from errors and will work as expected before deploying it to the production environment.
It’s up to your team to decide how best to integrate these environments into your workflow. One suggested workflow is as follows:
- Jane switches to the
developbranch in their local environment.
- Jane writes code to build a new feature in their local environment.
- When ready, Jane uses
git pushto send the changes to the remote
- Jane tests the new feature in the
- Everything looks good, so Jane pushes the changes to a new (temporary) branch (
- Jane creates a PR (pull request) against
- The new code shows up in VIP’s Review Queue, is reviewed, and then approved.
- Jane merges the PR to master.