Customers report a P1 bug in production. Feature work on `develop` continues. You need to ship a fix from main, tag it, and merge it into develop too.
Branch from main, fix, merge back, tag, then merge main into develop.
Medium · 6 steps · +550 XP
This scenario walks through 6 steps, in order:
Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.
git switch -c hotfix/v2.3.1git commit -am "fix: null pointer in checkout"git switch maingit merge --no-ff hotfix/v2.3.1git tag -a v2.3.1 -m "Hotfix"git push --follow-tagsHotfixes flow from main → tag → back-merge to develop. Always tag releases.