Skip to content

GitLab Merge Train - How It Differs from Merge

  • Sequential merging of multiple merge requests (MRs)
  • Automatic rebasing before merging
  • Ensures the target branch remains up to date
  • Reduces merge conflicts by merging MRs in a defined order
  • Runs pipelines in a queue before merging
  • Ensures each MR passes tests before integration
  • Avoids redundant CI runs for multiple MRs
  • Enhances pipeline efficiency and stability
  • MRs are added to the train automatically
  • Developers don๏ฟฝt need to manually rebase MRs
  • Ensures a predictable merge sequence
  • Reduces bottlenecks in collaborative projects
  • Detects conflicts before merging
  • Allows developers to resolve conflicts before final integration
  • Maintains clean and stable main branches
  • Reduces the risk of last-minute merge failures
  • Supports multiple merge trains per target branch
  • Runs tests for different MRs in parallel when possible
  • Manages queued MRs efficiently
  • Improves overall team productivity
  • Developers merge MRs manually
  • Requires rebasing or resolving conflicts individually
  • Higher risk of introducing conflicts into the main branch
  • Runs pipelines after merging into the target branch
  • Does not guarantee stability before merging
  • Might introduce errors if not tested properly before merging
  • Developers decide when and how to merge
  • No predefined order for merging MRs
  • More control over the process but requires manual intervention
  • Conflicts are resolved before or after merging
  • May cause delays if multiple developers work on the same branch
  • Increases chances of main branch instability
FeatureMerge TrainStandard Merge
Merging ApproachAutomated, sequential mergingManual merging
CI/CD ExecutionRuns pipelines before mergingRuns pipelines after merging
Conflict DetectionPre-merge conflict detectionPost-merge conflict resolution
RebasingAutomatic rebasing before mergingRequires manual rebasing
Branch StabilityEnsures stable target branchMight introduce instabilities
Merge OrderPredefined and managed automaticallyUnstructured and manual
Developer EffortReduced manual interventionRequires manual handling

For more details, refer to the GitLab documentation.