Skip to content

Hotfix Process

Johann Levesque edited this page Jan 23, 2026 · 6 revisions

Hotfix Release Process (Git Flow – PR-Based)

Hotfix releases are used to apply critical fixes to production.
This process aligns with the standard release workflow and follows Git Flow conventions.

Hotfixes:

  • Are branched from main
  • Are merged via Pull Requests
  • Are tagged from main
  • Are merged back into develop

Before starting:

  • Make sure package version numbers are updated (patch version only)
  • Make sure documentation has been updated (use CoPilot)
  • Ensure the fix is minimal and production-safe

Make sure packages version number are updated


1. Fetch the latest changes from upstream

git fetch upstream

2. Checkout the main branch and update it

If the local main branch already exists:

git checkout main
git pull upstream main

If the branch does not exist locally:

git checkout -b main upstream/main

3. Create a hotfix branch from main

git checkout -b hotfix/issue-id-or-description

4. Apply the fix and commit

git commit -m "hotfix: brief description of the hotfix"

5. Push the hotfix branch to upstream

git push upstream hotfix/issue-id

6. Open a Pull Request

  • Open a PR upstream from hotfix/issue-idmain
  • Ensure CI checks pass
  • Obtain required approvals
  • Merge using merge commit (do not squash)

7. Tag the hotfix release from main

After the PR is merged and main is up to date:

git checkout main
git pull upstream main
git tag vX.Y.Z

8. Push the tag to upstream

git push upstream vX.Y.Z

9. Merge the hotfix back into develop

git checkout develop
git pull upstream develop
git merge upstream/hotfix-branch
git push upstream develop

10. (Optional) Delete the hotfix branch

git branch -d hotfix/issue-id
git push upstream --delete hotfix/issue-id

Branch Flow Diagram

main ───────────────●────────── tag vX.Y.Z
   \                |
    \               |
     \── hotfix/* ──┘
             |
             v
          develop

Summary

  • Always branch hotfixes from a clean main
  • Use Pull Requests for all merges
  • Tag only from main
  • Use semantic versioning (patch only)
  • Always merge hotfixes back into develop