Hot fix branch

When the code in production has bug, we want to fix it based on the production code. This is almost the only case that we will make changes directly on the deployment branch.

In such case when a serious bug is found in the deployment branch. We check out the deployment branch and create a new branch. Usually we call the branch “hotfix”.

Then we commit the changes on this hot fix branch and push back to the deployment branch when we are done.

These changes are then pull back to the master/development branch. And team members may (or may not) merge the changes into their development branch. It depends if the changes affects the current developing features.

If the hot fix doesn’t affect existing developing features, developers don’t need to merge that changes. The code will merge in master/development branch when developer finished the feature branch and push to the master.