What is a hotfix?
A hotfix is an urgent fix for a critical error in production, which needs to be released as quickly as possible, without waiting for a planned release.
Put simply: a hotfix is an "emergency fix," used when production is already broken or is about to break.
When a hotfix is needed
A hotfix is made if:
- the application is crashing
- users are hitting a critical bug
- there is a security problem
- the system is not performing a key function (payments, login, etc.)
The main point is that you cannot wait for the next regular release.
What a hotfix looks like in Git (the process logic)
Most often (in Gitflow and similar approaches):
- A hotfix branch is created from the stable branch (
main) - A minimal fix is made in it
- The fix is urgently merged back into
main - A new version is released (a tag + a release)
- The changes are brought back into
develop, so they are not lost
Why a hotfix is a separate process
A hotfix:
- does not add new functionality
- contains only the fix
- minimizes the risk of side effects
Less code means fewer new bugs.
Hotfix and versions (SemVer)
A hotfix usually:
- increments the PATCH version
Example:
1.4.2 → 1.4.3
If the fix breaks compatibility (rare, but it happens):
- a MAJOR bump is possible
Hotfix and CI/CD
Often:
- a hotfix triggers a separate pipeline
- deployment to production happens by tag
- the process is automated as much as possible
From the fix to production takes minutes or hours.
What is important to say in an interview
- a hotfix is not an ordinary bug fix
- it is made from the production branch
- the goal is to quickly restore stability
- after a hotfix, the changes must be synchronized with the main development branch
Short answer for an interview
A hotfix is an urgent fix for a critical error in production, released separately from planned releases, usually from the stable branch, with minimal changes and a fast deployment.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.