Q31 of 40 · Git
Design a Git branching and tagging strategy for a 5-team QA organisation that needs to test features independently and also run full regression across all features before release.
Short answer
Short answer: Use trunk-based dev with short-lived feature branches per team, a shared `integration` branch for cross-team regression, and immutable release tags. Feature flags decouple merge from activation. CI enforces test gates at each stage.
Detail
A practical model for a multi-team QA org combines the discipline of trunk-based development with explicit integration and release milestones.
Branch structure:
main(trunk): protected, always deployable. All feature branches merge here via PR.feature/team-A-*(short-lived, < 1 week): each team develops and unit/component tests on their branch. Auto-deleted after merge.integration(optional, refreshed weekly): created frommainat the start of a regression cycle. All teams merge their features here. Full regression suite runs againstintegration— this is the shared stage for cross-feature testing. Not rebased; only merged into.release/vX.Y: cut fromintegrationafter regression passes. Only hotfixes go in. Tagged withvX.Y.0,vX.Y.1, etc. (annotated tags, immutable once published).
Feature flags: features on main are behind flags — the integration branch can activate them all together for regression without blocking individual team merges.
CI gates:
- PR into
main: unit + component tests (< 5 min). - Nightly on
main: full automated regression. - On
integrationbranch creation: full regression + cross-feature smoke. - On
release/*cut: smoke + performance baseline.
Tagging: git tag -a v2.5.0 -m "Release 2.5.0" <sha> on the release commit. Tags are signed (-s) in high-compliance environments.
// EXAMPLE
# --- Weekly integration cycle ---
# Create integration branch from current main
git switch main && git pull --rebase
git switch -c integration/2025-w21 main
git push origin integration/2025-w21
# Each team merges their feature branch (no-ff for traceability)
git switch integration/2025-w21
git merge --no-ff origin/feature/team-A-payment -m "Merge team-A-payment into integration/2025-w21"
git merge --no-ff origin/feature/team-B-checkout -m "Merge team-B-checkout into integration/2025-w21"
git push origin integration/2025-w21
# CI runs full regression against integration/2025-w21
# ... regression passes ...
# Cut release branch
git switch -c release/v2.5 integration/2025-w21
git push origin release/v2.5
# Tag the release commit (annotated, signed)
git tag -a -s v2.5.0 -m "Release 2.5.0 — payment + checkout features" HEAD
git push origin v2.5.0// WHAT INTERVIEWERS LOOK FOR
// Related questions
As a QA lead, how would you configure branch protection rules for `main` and `release/*` branches to enforce quality gates without slowing down the team?
Git
How would you handle environments (dev/staging/prod) for different test suite tiers?
CI/CD & DevOps
Compare Gitflow and trunk-based development — what are the QA testing implications of each?
Git