Bitzu

AZ-400 ยท Branching and pull requests

Choosing a branching strategy

Trunk-based development, feature branches, release branches, GitFlow vs GitHub Flow; short-lived branches, feature toggles, matching a strategy to release cadence and team size.

Key points

  • Trunk-based development: very short-lived branches into main (hours to a day or two), feature flags hide unfinished work; suits continuous delivery.
  • GitHub Flow: one branch per change, PR into always-deployable main.
  • Release branches: long-lived, stabilize and patch shipped versions; fixes via cherry-pick.
  • GitFlow: long-lived develop branch, scheduled versioned releases.
  • Shorter-lived branches, fewer merge conflicts.

Source: https://learn.microsoft.com/en-us/azure/devops/repos/git/git-branching-guidance?view=azure-devops

Practice questions

Single choice

Which approach keeps branches extremely short-lived and relies on feature flags to hide unfinished work?

  1. GitFlow
  2. Trunk-based development
  3. Long-lived environment branches
  4. Fork-per-developer model
Show answer

Answer: B. Trunk-based development

Trunk-based development integrates into main continuously and uses flags so incomplete code can merge safely. GitFlow does the opposite: it keeps long-lived develop and release branches.

Select all that apply

Which statements describe GitHub Flow?

  1. The main branch is kept in a deployable state
  2. Each change is developed on its own branch created from main
  3. Changes reach main through a reviewed pull request
  4. A permanent develop branch collects all work before release
  5. A new long-lived release branch is cut for every supported version
Show answer

Answer: A. The main branch is kept in a deployable state, B. Each change is developed on its own branch created from main, C. Changes reach main through a reviewed pull request

GitHub Flow is deliberately light: main is always deployable, each change gets its own branch, and a pull request is the gate. A permanent develop branch and per-version release branches belong to GitFlow-style models.

True or false

Trunk-based development means developers commit straight to main and pull requests are not used.

Show answer

Answer: False

False. Trunk-based teams often still use pull requests, just on very short-lived branches that merge within a day or two. What defines the model is small, frequent integration, not the absence of review.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module