Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the source branch for existing merge request in gitlab?

I have a merge request and a source branch is already bound to it. Now I pushed another branch and want to change the merge request to be point to the new branch. Is that possible with gitlab-ce? If yes, how?

In essence, I want to use "Fast-forward merge" as merge method without being forced to force-push to the source branch.

like image 412
helt Avatar asked Jun 07 '19 09:06

helt


People also ask

How do I change a target branch in merge request?

Go to the pull request and click the ellipsis button and select Edit. From here you can change the target branch for the pr.

How do I change the default merge branch in GitLab?

Sign in to GitLab as a user with Administrator permissions. In the left navigation menu, go to Settings > Repository. Expand Default branch, and select a new default branch. (Optional) Select the Auto-close referenced issues on default branch check box to close issues when a merge request uses a closing pattern.

How do you commit new changes to an open merge request?

Select the Start a new merge request with these changes checkbox or toggle. This checkbox or toggle is visible only if the target is not the same as the source branch, or if the source branch is protected. Select Commit changes.


1 Answers

No, regarding https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47020 this is unfortunately not possible. The statement is from last year, but it seems that there were no changes in supporting this for now.

To not loose the discussion completely, you can link the old MR in the new MR. With that you at least have some indirect relation to the discussion.

like image 189
TheFRedFox Avatar answered Sep 21 '22 06:09

TheFRedFox