Git revert merge commit, lost some files

Viewed 1297

So I've merged wrongly my feature branch on release and pushed. Then reverted it back, with a reverse commit of the merge commit, and everithing went well.

The problem shows up when trying to merge release onto master, noticed some missing files and weird changes. The problem turns more scaring when that corrupt merge is actually pushed on my master branch

Looking back into revert merge commit (W1), I see all those missing files where file deletions in the reverse commit.

Keeping in mind that the feature branch is going to be merged anyways on the master, I was thinking on rebase -i from master on that reverse commit (W1) and go ahead just like that merge was done without reverse commit.

Do you think there's a better solution??

Thank you all! :) enter image description here

EDIT

First of all, thanks for your attention and response! I've added some things on the picture to better explain the situation.
Actually we dont care anymore of the release branch in the picture, it only affects a few files and can be present on master without any major problems. The file addition and modification where made in master between the creation of release and feature.

I'm triying to rebase the master branch, after the release merge (M2) deleting (W1). I know that we are loosing some release history, but I think it's a better solution to "save" the actual released code and if it becomes necessary, we can start a repo from it. There are like 1000 commits to rebase, and some conflicts are sowing up. I'm correcting every evident conflict with the latest correct version of each file.

EDIT 2

Finally we rebased the master branch, and then applied differences at the top of the branch, like a "fake rebase", in this way the changes are visible and alterable.

1 Answers
Related