Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.9 KB

cherry-picks.md

File metadata and controls

58 lines (44 loc) · 1.9 KB

Cherry Picks

This document explains how cherry picks are managed on release branches.

When to Cherry Pick

Cherry picks are used to backport changes from main to release branches. Only the following types of changes are eligible:

  • Security fixes — Vulnerability patches
  • Critical bug fixes — Data loss, crashes, hangs
  • Regression fixes — Fixes for bugs introduced in recent releases
  • Documentation corrections — Important doc updates

Feature additions and non-critical changes should not be cherry-picked.

How to Cherry Pick

  1. Ensure the original PR is merged into main
  2. Check out the release branch:
    git checkout release-X.Y
    git pull origin release-X.Y
  3. Cherry-pick the commit:
    git cherry-pick -x <commit-hash>
    The -x flag adds a reference to the original commit in the cherry-pick message.
  4. Resolve any conflicts, then commit:
    git cherry-pick --continue
  5. Push the branch and create a PR:
    git push origin release-X.Y

Cherry Pick Review

Cherry pick PRs should:

  • Reference the original PR in the description
  • Include a clear justification for the backport
  • Be reviewed by a maintainer of the target release branch
  • Include the target release version in the title, e.g. [release-1.0] Fix crash on startup

Troubleshooting

Conflicts: If the cherry-pick does not apply cleanly, manually resolve conflicts before continuing. Ensure the resulting change is functionally equivalent to the original.

CI failures: If the cherry-pick causes CI failures, investigate whether the fix depends on other changes in main. If so, those dependencies may also need to be cherry-picked.