git-backport-fix.html


* created: 2026-01-15T13:16
* modified: 2026-01-15T17:13

title

Git: Backport Fix

description

Quick guide on how to backport a fix to an earlier release.

Git: Backport Fix

First checkout the release branch you want to apply the change to:

git checkout upstream/release/vX.XX.X 

Create a hotfix branch:

git switch -c hotfix-whatever

Then cherry pick your fix. The -x flag appends a line that says "(cherry picked from commit ...)".

git cherry-pick -x <commit-with-fix> 

Finally push your back-ported fix.

git push origin hotfix-whatever

And merge it into the release branch you checked out.