A hotfix branch is for urgent production patches that can't wait for the normal release cycle.
Workflow:
git switch main (or the production tag: git switch -c hotfix/v1.0.1 v1.0.0)
git switch -c hotfix/null-deref
- Fix → commit → push → PR → review → merge.
- Tag:
v1.0.1.
- Merge the hotfix back into your active dev branches (main, current release) so the fix doesn't get reverted later.
Key discipline: hotfixes branch from the production tag, not from main — main may have unfinished work that shouldn't ship.