Rename branch on merge request

Hey guys,

I currently have an open merge request on my GitLab repo. However, I want to rename the branch which is used for the merge request without closing the merge request. Could you please tell me how I can manage that? Thank you in advance.

Hi @Framtale

I think that it is not possible to change the source branch of an MR, once it’s created (it is possible to change the target branch with the Edit button on the top right).

In which case, your only option is to push a new branch and raise a new MR, which is a bit annoying because you will lose your comment history.

Personally, I’d avoid changing the branch if at all possible, but of course I don’t know what your use case is.

Hi,

Anyone knows if this feature is maybe on the CE roadmap? I think GitHub introduced this recently where you can change the branch name and it will pull all the related PRs into the renamed one.

Edit: Support for renaming an existing branch | GitHub Changelog