I am using git. I have 3 branches master(m), feature1(f1) and feature2(f2).
--------------------- m
| |
| ------- f1
------------- f2
I have merge f1 into f2. and then reverted the merge and later merge f2 to master, now master have commit for merging f1 and reverting the f1 merge.
Now i want to get the latest changes from the master so want to merge master to f1, but when i tried to merge it removed all my previous changes. Is there a way to merge master to my feature1(f1) without the merge revert commit.
When reverting a merge commit those changes will never be made available in any subsequent merge as the revert prevents any ancestors being included in the merge.
You can overcome this by reverting the revert commit on the f1 branch after merging master. Don't revert on master as you'll have the f1 changes in master before the merge into f1 which I'm guessing you don't want.