Skip to content
CodeKruPro

Copy one fix to a release branch

QuizMedium

A one-commit fix on main must also go to release/2.4 (a branch that holds the code of one released version), but none of the other new commits on main. What do you do?

  • Switch to release/2.4 and run git cherry-pick COMMIT_ID: it applies that commit's change as a new commit on the release branch
  • Merge main into release/2.4
  • Rebase release/2.4 onto main
  • git revert the fix on main

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in