Gitflow
🚀Combine Bugfix Branches Into a ReleaseMedium+600 XP
Workshop
Scenario reference

Combine Bugfix Branches Into a Release: the situation, step by step

The situation

Three bugfix branches (`fix/a`, `fix/b`, `fix/c`) are all approved. You need them combined onto `release/v3` for a coordinated deploy.

Create release branch from main, merge each fix, push.

Medium · 5 steps · +600 XP

What you will practice

This scenario walks through 5 steps, in order:

  1. 01Create the release branch from main
  2. 02Merge fix/a
  3. 03Merge fix/b
  4. 04Merge fix/c
  5. 05Push the release branch
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Create the release branch from main
    git switch -c release/v3
  2. 2. Merge fix/a
    git merge --no-ff fix/a
  3. 3. Merge fix/b
    git merge --no-ff fix/b
  4. 4. Merge fix/c
    git merge --no-ff fix/c
  5. 5. Push the release branch
    git push -u origin release/v3

Key takeaway

Stable release branches are sandboxes for cherry-picked fixes.