I am looking for the best approach for merging stacked Merge Requests in Gitlab. By “stacked” I mean the following:
MR1
that is opened from branchfeature/A
ontomain
;MR2
that is opened fromfeature/B
ontofeature/A
;MR3
that is opened fromfeature/C
ontofeature/B
.
As soon as I have all three merge request approved, I want to merge them at once. What is the best possible approach for this scenario? How am I supposed to merge this Merge Requests via web UI? Consider the “Delete branch on merge” and “Squash commits on merge” features to be enabled.
I have tried to merge feature/C
into main
locally and then push the updated main
branch to the remote repository. However, that resulted into MR1
was automatically closed, but the MR2
and MR3
remained opened in the repository.
1