What is the GitHub 'Merge Queue' and what problem does it solve?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Merge Queue solves the late merge problem. Two PRs each pass CI on their own. But after you merge the first one, the second one's branch is now stale and might fail CI when merged. Merge Queue tests them together before merging, so the branch is always in a good state.
Full explanation below image
Full Explanation
GitHub Merge Queue (previously called 'Merge Train') addresses the 'passing CI but failing after merge' problem in high-velocity repositories. The problem: PR A and PR B each pass CI independently, but when merged together, they conflict or cause failures. Merge Queue solution: (1) When a PR is added to the queue, it's tested together with all other queued PRs that will be merged before it. (2) A temporary merge group branch is created to test the combined changes. (3) If the group passes all required checks, all PRs in the group are merged. (4) If the group fails, problematic PRs are isolated and retested. Benefits: maintains a consistently passing main branch, reduces the 'rebase and retest' cycle for popular repositories, and enables confident continuous delivery. Requires branch protection configuration to enable.