I have searched but all examples I have found only involves 2 branches. We have 3 branches
- Master (m)
- Develop (d)
- Feature (f)
Where the feature branch is supposed to be merged directly into master but there is a merge from develop into the feature branch that should not be there.
1 2 f *----c---------*--c----* / / \ 3 m *--------*--------------/-----------*--- ------* \ / / d *---------c-------c-*-----c----------- ----*
What will happen if I revert commit 1 from develop inte feature? Will I lose parts of develop on commit 3?
To clarify #2 is not done yet there is just a PR at that stage now.
Nice mess-up you dug yourself into, huh!
There is a direct later merge of
developintomasterso it's not like you included something inmasterfromdevelopthat should not be there.... in this case, if there is something real to gain, it would only be cosmetic to clean up history of your feature branch... and if you went ahead to remove that merge commit (which is possible.... by rewriting history), it would also require rewriting history ofmasterto get it really cleaned up so.... there is no practical gain in trying to clean it up. Live with it.... unless you really really really want to rewrite history ofmaster(which should be a show-stopper right there).If
developwere not merged intomasterthen that would be a nice case to study.