Interview Prep/Git & GitHub/Branching Strategies and Releases

You are cutting a release. How do you manage the release branch and late fixes?

IntermediateScenarioBranching Strategies and Releases
Answer

Situation read → The release needs stabilising while main keeps moving.

What I'd do →

  1. git switch -c release/2.5 main and protect it.
  2. Only bug fixes go in; each is fixed on main first, then cherry-picked with -x.
  3. Tag release candidates: git tag -a v2.5.0-rc.1 -m "RC1".
  4. When ready, tag v2.5.0 on the release branch and publish.

Why → The branch freezes scope without freezing everyone's work.

Interview tip → Fix on main first so the next release does not regress.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases