On the project we are working I have found a 'git merge' interaction which has left me baffled. I would like to have some insights on it.
We have a project which is being tracked by git. We have the main developing branch 'develop', from this branch there is a branch with some new features 'a'
'develop' has had some commits of others features which has also been merged without problems on 'a' to keep the "final" changes on both sides
At some point we start a new feature 'b' which, by mistake, is branched from 'a' instead of 'develop'. Once the development was completed 'b' got merged into 'develop' and 'a' without problems (at least I can't see them on git log)
After this 'develop' got a new feature branched from 'develop' as it should but now when i try to merge this into 'a' i find that it's taking as if we erased every single commit done in 'a' from it's origin up until the moment we last merged 'b'
I know that there was a huge mistake there branching from 'a' instead of 'develop' but i can't wrap my head around the behaviour it's having
I just want to know if anyone can explain the reason behind this Thanks in advance