Intro
I'm working on an application that has different deployment environments:
- DEV (development)
- UAT (user acceptance testing)
- PROD (production)
I understand that development for a new release happens in DEV, is pushed to UAT for testing and then pushed to PROD for actual usage. Different environments are used to makes sure that developers can play around and make errors without disturbing actual users of the application.
However I'm a bit confused about what happens when a "hotfix" (=bug that needs to be fixed urgently) is required. A colleague told me that in this case the code of the PROD environment is "branched" and pushed to DEV. When the bug is fixed on dev, the branch is pushed further to UAT and finally PROD again. Even if there were already some developments for a next release in DEV, then still this work would not be lost as the "hotfix" is done on a different "branch".
Question
Is the following understanding, relating to the difference between deployment environments and code branches, correct?
- A code branch is just a copy of a codebase that starts living a separate life until it is merged with the main code branch again.
- A deployment environment is an environment that has code, a database for the code to interact with and computing power to execute the code.
The difference is thus mainly that the deployment environment has a database and computation power on top of the pure "code".