Answer the question
In order to leave comments, you need to log in
How could a destructive merge of branches happen in git without a merge?
A team of 6 developers is working on a project hosted in git on their @GitLab server.
There was an incident in the repository yesterday that I can't find an explanation for. Rather, my knowledge is not enough to understand how this could be done. So, in order:
Here is a tree that displays all the mess of suboptimal work with git in one dev branch :)
There are sub-branches: conditionally red and blue, which diverged about 20 commits ago, but at one point, which is cursor, these branches wanted to merge. The author claims that there was a conflict that he resolved as usual and poured in as usual. But in the end, somehow there was a merger without merge and all 20+ commits from the blue branch simply did not go to HEAD.
The author of the destructive commit claims that nothing supernatural happened, but somehow I am not inclined to believe in divine intervention. I really want to understand how, in principle, you can screw up so that the situation does not happen again in the future?
PS: I did resolve the incident: rollback -> rebase -> push --force. It was scary because the first time I had to rebuild the tree and I, with only about 3 months of experience with git, suddenly found myself more well-read than developers who work with git much more :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question