What Is a Hotfix?
A hotfix is an urgent, targeted change deployed quickly to fix a serious problem in production, outside the normal release schedule.
When production is broken and waiting for the next scheduled release is not an option, you ship a hotfix: a small, focused change made and deployed fast to stop the bleeding. Done well, it is quick but still safe.
What it is
A hotfix is a minimal change that addresses a critical, time-sensitive problem in production, a crash, a security hole, a major broken feature. It is deliberately small and scoped to the problem, so it can be reviewed, tested, and shipped quickly without dragging in unrelated changes.
Hotfix versus rollback
Both recover from a bad situation, but differently. A rollback reverts to a previous version, undoing the problem and anything else in the new release. A hotfix moves forward with a small corrective change. You roll back when the previous version is fine; you hotfix when going back is not an option or the bug predates the last release.
An example
A bug causes the login page to crash for some users. Reverting would also undo a needed feature shipped in the same release, so instead a developer writes a two-line fix, gets a fast review, lets CI verify it, and deploys just that change, restoring logins within the hour.
Why hotfixes still go through CI
It is tempting to skip the pipeline when you are in a hurry, but that is exactly when mistakes happen. Running the hotfix through CI, build, tests, checks, takes minutes and prevents the all-too-common scenario where a rushed fix makes the outage worse. A fast, reliable pipeline makes this safe.
After the hotfix
- Make sure the fix is merged back into the main line, not just the release.
- Add a regression test so the bug cannot return.
- Review what let the bug reach production.
- Fold any lessons into the normal process.
Key takeaways
- A hotfix is an urgent, small change to repair production fast.
- It moves forward with a fix; a rollback reverts instead.
- Even urgent hotfixes should pass CI to avoid making things worse.