A hotfix is an urgent fix for a critical bug in production, performed outside the regular release cycle. Unlike a planned release, a hotfix skips some QA and testing stages to deliver the fix to users in the shortest possible time. According to the Atlassian Git Workflow Guide, a hotfix branch is created from the latest release tag, and after application it is merged back into main and develop. Hotfix process includes a minimal set of checks sufficient for confidence that there is no regression.
Key Takeaways
A hotfix (hot fix) is a patch for the production version of an application released out of queue to fix a critical problem. A hotfix is delivered to users in hours, not days, and is intended solely for situations where the application is unavailable, losing data, or compromising user security.
Typical scenarios for a hotfix: a crash on startup on certain devices (regression after the last release), personal data leakage due to incorrect authorization, a broken payment integration (revenue loss), GDPR/CCPA compliance violations. All these situations have severity P0 or P1 in incident classification. Planned tasks — optimization, refactoring, new screens — are never done via a hotfix.
An important rule: a hotfix contains a minimal number of changes (1–2 files, 10–20 lines of code). The smaller the diff, the lower the risk of introducing a new bug. If fixing the issue requires changing the architecture or adding a new module — this is not a hotfix but an emergency release that requires a full code review and QA.
The main differences between a hotfix and a planned release are speed, scope of changes, and level of testing. A planned release may include dozens of features, go through a full QA cycle (regression + integration + UI tests), and take 1–2 weeks from code freeze to deployment. A hotfix includes one or two fixes, goes through accelerated review (2 approvals instead of 3), and minimal smoke testing.
From a Git process perspective, a hotfix is created from a release tag, not from the develop branch. This ensures that only the changes necessary to fix the problem are included in the hotfix, without accidentally pulling in unfinished features from develop. After deployment, the hotfix is merged back into main and develop (via cherry-pick or merge).
| Criterion | Planned Release | Hotfix |
|---|---|---|
| Scope | Multiple features and bug fixes | 1–2 critical fixes |
| Branch | Release branch from develop | Hotfix branch from release tag |
| Code review | 3 approvals, full process | 2 approvals, fast-track |
| QA | Full regression suite | Smoke test + affected area |
| Time to deploy | 1–4 weeks | 1–24 hours |
| Rollback | Via revert commit | Via rebuilding the previous tag |
Important: not every urgent task is a hotfix. If a manager says “we urgently need to add a button” — that’s not a hotfix, it’s a priority shift. A real hotfix is determined by severity for the user, not urgency for the business. The criterion: if the application is not crashing and data is not leaking — the task waits for a planned release.
The first step upon discovering a critical problem is triage — a quick severity assessment. The on-call engineer confirms the bug, checks logs and crash reports, and determines whether the problem is a regression from the latest release or a long-standing bug. If severity is P0 — the hotfix pipeline is triggered. The triage stage should take no more than 15 minutes.
The second step is creating a branch from the latest release tag (v2.5.0 → hotfix/v2.5.1). The developer makes the minimal fix, commits with the HOTFIX prefix in the message, pushes, and opens a PR labeled [HOTFIX]. Fast-track code review: two reviewers are assigned automatically via CODEOWNERS, review time — no more than 30 minutes. If no review in 20 minutes — the reviewer is skipped and the next one is assigned.
The third step is build and deploy via CI/CD. The hotfix pipeline differs from the normal one: long integration tests (taking hours) are skipped, only the smoke suite runs (10–15 critical scenarios, 5–10 minutes). After deployment: monitoring of crash rate, error rate, API latency — for 30 minutes. DORA metrics for hotfixes: mean time to recovery (MTTR) should be less than 1 hour.
# .github/workflows/hotfix-deploy.yml
name: Hotfix Deploy Pipeline
on:
pull_request:
types: [labeled]
branches: [hotfix/*]
jobs:
hotfix-checks:
runs-on: ubuntu-latest
if: contains(github.event.label.name, 'hotfix-critical')
steps:
- uses: actions/checkout@v4
- name: Validate diff size
run: bash .github/scripts/diff-check.sh 30
- name: Build
run: ./gradlew assembleRelease
- name: Smoke test
run: ./gradlew smokeTest
- name: Deploy to staging
run: fastlane deploy_staging
- name: Approve & deploy to production
if: success()
run: fastlane deploy_production
env:
HOTFIX_MODE: true
Key optimizations in this pipeline: diff check (no more than 30 lines), skipping integration tests, automatic deployment to staging and production if the smoke test passes. HOTFIX_MODE env variable enables additional runtime checks — for example, extended logging for quick problem diagnosis.
The strategy for working with hotfix branches is described in Gitflow Workflow. The main rule: a hotfix branch is created from the latest release tag (git checkout -b hotfix/v2.5.1 tags/v2.5.0), not from develop or main. This ensures that the hotfix is based on the same code state currently in production and does not pull in unfinished changes from develop.
After the fix is complete, the hotfix branch is merged into main (or master) and develop. Into main — a regular merge commit with a new patch release tag (v2.5.1). Into develop — a merge or cherry-pick, depending on team policy. If develop contains more changes than main, cherry-picking the specific hotfix commit is recommended to avoid conflicts. GitFlow recommends merging the hotfix into main first, and then merging main into develop.
# Create hotfix branch from the latest release tag
git checkout -b hotfix/v2.5.1 tags/v2.5.0
# Apply the fix
git commit -m "HOTFIX: Fix crash on Android 14 notification permission"
# Merge to main and tag the release
git checkout main
git merge --no-ff hotfix/v2.5.1
git tag -a v2.5.1 -m "Hotfix release v2.5.1"
# Merge to develop as well
git checkout develop
git merge --no-ff hotfix/v2.5.1
# Clean up temporary branch
git branch -d hotfix/v2.5.1
Important: if the hotfix fixes a bug that exists in the current develop branch (the bug was introduced several sprints ago), then after merging the hotfix into main and develop, develop already contains the fix. If the bug was only introduced in the release branch (an error accumulated via cherry-pick), then the fix may not be needed in develop. Root cause analysis helps determine whether a cherry-pick to develop is necessary.
The main risk of a hotfix is introducing a new, more serious bug due to haste. According to a Stripe study (2021), 15% of hotfixes cause a regression and require a second hotfix. This is a law of irony: the faster we fix, the higher the chance of making a mistake. Risk minimization is achieved by strictly limiting the diff size (no more than 30 lines) and mandatory automated smoke testing.
The second risk is technical debt accumulation. If a team regularly uses hotfixes instead of planned releases, the codebase degrades: hotfix commits don’t undergo refactoring, temporary solutions aren’t replaced with proper ones, documentation isn’t updated. Health check: if hotfixes are released more than once a month — the release process needs review.
The third risk is psychological. Regular hotfixes burn out the team: on-call developers are under constant stress, code review becomes a formality (everyone wants to go faster), and the quality culture declines. A normal hotfix frequency for a mature team is 1–2 per quarter. If more — the problem is not with hotfixes but with the quality of planned releases.
After deploying a hotfix and stabilizing metrics, a blameless post-mortem retrospective is conducted. The team answers four questions: what happened, why didn’t the checks catch the bug, what was done to fix it, and how to prevent recurrence. The post-mortem is conducted within 24–48 hours after the hotfix, while details are still fresh. Blameless culture is a key principle: processes are discussed, not people.
The result of the post-mortem is concrete action items with owners and deadlines. Typical action items: add a unit test for the missed case, expand the smoke test suite, improve monitoring (add an alert on the metric), update the runbook for similar incidents. Action items must be completed before the next planned release.
Frequently Asked Questions
Not exactly. A patch release is a planned delivery of minor fixes on a regular schedule. A hotfix is an emergency fix outside the schedule. Patch release goes through a full QA cycle, hotfix uses a shortened one. But technically both can use a patch version bump (v2.5.0 → v2.5.1).
No, a hotfix is always committed to Git for traceability. The exception is an emergency fix at the configuration level (feature flag, remote config) that doesn’t require code changes. Every hotfix must be tied to a commit with a clear message and referenced in the incident ticket.
For iOS, a hotfix through App Review takes 1–24 hours (expedited review is possible). For Android — 1–4 hours through Google Play Console. Deployment time depends on store policy and the availability of an emergency review process.
The decision is made by the on-call engineer based on severity criteria. If severity is P0 — the hotfix is launched without additional approvals. P1 — requires approval from the tech lead. Team empowerment: the on-call engineer has the authority to launch a hotfix without bureaucracy.
For a mature team — 1–2 hotfixes per quarter. A frequency of more than once a month signals problems in the QA process, insufficient test coverage, or an incorrect release strategy. Normal hotfix frequency is a KPI for development process quality.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also