Set default target branch in MR for release branches

Problem to solve

When using release branches for all current sprint features, and merging them into main branch at release, is there a way to dynamically set target branch of new MRs? Or leave it blank forcing the user to set it.

Steps to reproduce

Create a new release-2025.06 branch from main branch. Create a feature branch from release-2025.06. Push feature branch to release branch, create MR. The target branch is always the main branch.

Versions

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Versions

  • GitLab: 17.8.6-ee

Hi,

You should be able to do this if you have GitLab Premium license.

By default, new MRs always target the default branch, which I suppose is main.

If you’d like the MRs to target a different branch by default, you can set this in Project Settings → Merge Requests → Merge request branch workflow. Just note, this is not a restriction, it’s just to give MR creator a default setting.

Hope this helps!