Just keep the enironments separate, but similar. What works in the test environment, should work in production.<p>Of course, there are always exceptions to this rule. Adapt and modify the code as needed.<p>We keep three environments at work: Dev, Test and Prod. However, dev environments are sometimes neglected and some features land in Test only.<p>So, use Dev as a development playground. Use Test to test the changes made in Dev. If the change is approved in Test, it will go in Prod environment.