Git Cherry Pick Hotfix
Trigger Boundary
- •Use when a fix from one branch must be ported to another without full merge.
- •Do not use for broad release synchronization; use
git-pr-sync-workflow. - •Do not use for feature migration involving many dependent commits.
Goal
Backport urgent fixes safely with minimal unrelated change propagation.
Shared Git Contract (Canonical)
- •Use
../git-branch-strategy/references/git-governance-contract.mdas the single schema and gate source. - •Track hotfix backports with
GIT-CHP-*IDs. - •Run machine validation:
python3 ../git-branch-strategy/scripts/validate_git_contract.py --manifest <path/to/manifest.json>.
Inputs
- •Source fix commit hashes and dependency notes
- •Target branch release constraints
- •Verification scope for target environment
Outputs
- •
GIT-CHP-*cherry-pick execution record - •Dependency and risk annotation per picked commit
- •Target-branch verification checklist and result
Workflow
- •Identify minimal commit set required for the fix.
- •Validate hidden dependencies before cherry-pick.
- •Apply commits in dependency-safe order.
- •Resolve conflicts and verify target branch behavior.
- •Record source-to-target mapping with security review evidence.
Quality Gates
- •Picked commits exclude unrelated feature changes.
- •Dependency assumptions are explicitly validated.
- •Target branch tests pass for impacted flows.
- •Security Reviewer approval is present for
GIT-CHP-*artifacts.
Failure Handling
- •Stop when hotfix requires broad dependency migration.
- •Escalate when target branch behavior diverges from source assumptions.