Reputation: 105
We were trying to merge a feature branch onto master and for some reason the changes were committed directly onto master without the knowledge that it came from the feature branch. (So the commit on master was regular commit with the files and not a merge commit).
As a result, now that we're trying to merge changes from the feature branch again, all the files are conflicting.
How would I go about using Git Interactive Rebase to replace that direct commit on master with a merge commit like it was supposed to be?
Or left is the way it looks at the moment, right is the way I want it.
Upvotes: 0
Views: 106
Reputation: 534893
In your diagram there are just 5 commits:
master conflicty ----- feature B
master not a merge ... feature A
master before
So no need to rebase. Reset master hard to master before
, merge feature A
, merge feature B
. Done.
You have now rewritten public history so the usual warnings apply.
Upvotes: 2