How do GitLab merge trains work?

AdvancedConceptGitLab CI
Answer

A merge train queues MRs; for each MR GitLab creates a temporary merge result that includes the target branch plus all MRs ahead in the train, and runs the pipeline on it. If it passes the MR merges; if an earlier MR fails, later ones are rebuilt without it. Pipelines must be configured for merge request events (rules with merge_request_event), and "merged results pipelines" must be enabled. The effect is a main that is always green without developers constantly rebasing.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI