GitLab merge trains without Premium
Merge trains make sure every merge request is tested against the code it merges into. They are a GitLab Premium feature. Auto Merge gives the same guarantee on GitLab CE, with a different trade-off.
What a merge train guarantees
Without a queue, a merge request is tested against the target branch as it was when the pipeline started. Two merge requests can each be green and still break the default branch together.
A GitLab merge train runs every pipeline on the target branch combined with all merge requests ahead of it in the train. A merge request merges only when that pipeline passes. If it fails, GitLab removes the merge request from the train and restarts the pipelines behind it.
Who gets merge trains
Merge trains need GitLab Premium or Ultimate and merged results pipelines. GitLab Premium costs $29 per user per month, billed annually. The price applies to every user, not only to the developers who merge.
| Team size | GitLab Premium per year | Auto Merge per project and year |
|---|---|---|
| 20 users | $6,960 | $0 during early access, $588 at the planned price |
| 50 users | $17,400 | $0 during early access, $588 at the planned price |
| 100 users | $34,800 | $0 during early access, $588 at the planned price |
Prices from about.gitlab.com/pricing as of November 2026.
How Auto Merge gives the same guarantee on GitLab CE
- Auto Merge builds one queue per protected target branch from the approved merge requests.
- It rebases the merge requests at the head of the queue onto the current target branch.
- GitLab runs the normal merge request pipeline on the rebased branch, which is exactly the code that lands.
- Auto Merge merges the head of the queue once that pipeline is green and every discussion is resolved.
- The next merge request is already rebased and often already tested.
Every merge was tested on top of the commit it merges into. Auto Merge uses only the REST API and webhooks, which GitLab CE has.
Where they differ
| GitLab merge trains | Auto Merge | |
|---|---|---|
| GitLab edition | Premium, Ultimate | CE, EE, GitLab.com |
| What is tested | A temporary ref: target branch plus the merge requests ahead | The rebased merge request branch itself |
| Parallel pipelines | Up to 20 per train by default | One merge per target branch at a time, rebases prepared ahead |
| Conflicts with the target branch | The developer rebases by hand | Label "Has conflicts" and a status section that says so |
| Merge order | Order of adding to the train | "Main fix:" first, then Merge First, regular, Merge Last |
| CI runners | FIFO, like every GitLab job | Jobs of other merge requests yield their slots to the next merge |
| Overview | Merge train page (GitLab 17.3+) | Status section in every merge request and REST API |
| Trial without risk | No | DryRun and OnlyLabels modes |
When merge trains are faster
Merge trains test many merge requests at once. With long pipelines, many independent merge requests and spare runners, a train merges more per hour.
When Auto Merge costs less CI
A merge train restarts every pipeline behind a failed merge request. Auto Merge starts no speculative pipelines and hands runner slots to the next merge first. Teams with a fixed runner pool get their merges through without extra CI minutes.
Moving from merge trains to Auto Merge
- Keep "Pipelines must succeed" in the merge request settings of the project.
- Start Auto Merge in
DryRunand compare its log with what the train does. - Switch to
OnlyLabelsso the team sees the status labels and sections. - Turn merge trains off in the project settings and switch Auto Merge to
Run.
Self-hosted GitLab CE has no merge trains to turn off: start at step 2.