Reputation: 7128
I want to merge all my existing merge requests manually. Let's say these are my existing merge requests:
1) feature1 --> master
2) feature2 --> master
For some business requirements, I need to merge all existing merge request branches to an intermediate branch called integration
on my local. And then I need to merge integration
with master.
.And on my workstation, what I'm doing is:
$ git clone ...
$ git fetch
$ git checkout master
$ git checkout -b integration
# Rebase feature1 with integration and merge
$ git checkout feature1
$ git rebase integration
$ git checkout integration
$ git merge feature1
# Rebase feature2 with integration and merge
$ git checkout feature2
$ git rebase integration
$ git checkout integration
$ git merge feature2
# Merge integration to master
$ git checkout master
$ git merge integration
$ git push origin master
But when I check merge requests on GitLab, I only see the first one as merged. Second pull request still open even if the merge is successful.
Upvotes: 0
Views: 3675
Reputation: 4253
Rebasing feature2
on top of integration is most likely creating a situation where none of the commits on your feature2
branch end up in the integration
branch.
Remember that rebase does not modify the existing commits, but replaces them with new commits.
Try this:
# Rebase feature2 with integration and merge
$ git checkout feature2
$ git rebase integration
# This will update your pull request so gitlab can detect the merge
$ git push origin feature2
$ git checkout integration
$ git merge feature2
Upvotes: 1