Maintained inĀ https://www.notion.so/build-one/Git-Workflow-be5694f897934a38b558d3b36c574a7e |
Hotfix branches are similar in behavior to release branches, where QA is the main focus. Whenever an issue is reported by QA, feature branches are created to resolve them.
Where hotfixes differ to releases is in how they are created, finished and in their purpose.
A hotfix has the function of providing urgent fixes to existing releases, hence it is created directly from the release tag and, conditionally, merged into develop.
When the hotfix has been finished and approved by QA, a tag will be created, to mark the version. If the hotfix is done on the most recent release, then the hotfix also needs to be merged into develop to ensure that the fix is also included in the next release.
In case of a fix on an older release, the branch is simply deleted without any merge as the fix might not be relevant at all to more recent releases, for whom, hotfixes can also be created, if required.
When a hotfix is finished only the patch value can be increased.
git fetch --tags --force git checkout -b <HOTFIX> <SOURCE> git push origin <HOTFIX> ------------ <SOURCE> - source branch for the hotfix (x.y) |
# get latest version of the release git fetch git tag <VERSION> git push origin <VERSION> # update maintenance tag and push it to remote # if it is a hotfix to the latest release, git checkout <TARGET> git merge <HOTFIX> git push origin <TARGET> ------------ <MAINTENANCE> - partial version of the hotfix (x.y) |