Home > Blockchain >  Remerge MR in GitLab
Remerge MR in GitLab

Time:12-04

I did a Merge Request and already merged it, but want to edit commit messages squash/unsquash commits, etc. I know that I can do something that via git commit --fixup/git rebase into merged branch, but what will be with the MR itself? Will it be automatically fixed or not?

Let's say I have a source branch:

$ git log --oneline -n2
b6ddddddd commit message 1
b7ddddddd commit message 2

And I have a branch where source branch is merged to:

$ git log --oneline -n2
c6cccccac Merge branch `source` into `destination`
c7cccccbc MR Commit message

Here I have MR that actually has two squashed commits (b6ddddddd, b7ddddddd), but I want to "unsquash" commits and redo MR (that one is merged), is there a way to do so or I need to open a new MR?

CodePudding user response:

I did a Merge Request and already merged it

That would mean "reopening the MR", and that is not currently (2022) possible, as explained here.

It is best to make a new separate MR, with the source branch rebased on top the target remote branch, and where you can push again, for said new MR.

  • Related