I'm not that experienced with Git and now I have a big problem falling into my lap.
Here's how my current branch look like:
feature /---F1-----F2----\
/ \
master -----M0-----M1-----M2-----M3-----M4
\ /
bugfix \--B1-----B2-----------/
The situation:
Someone did a very bad thing and pushed a really bad merge (M3). I only noticed the bad merge when our models (not source code) wouldn't load after I merged B1 and B2 into M4. Luckily, I haven't pushed M4 yet.
The problem:
How do I set things right again? I want M0, M1, M2, F1, F2, B1, and B2. But I don't want M3 and M4 (since M4 is obviously broken). If I have to abandon changes, then F1 and F2 can be sacrificed :)
I looked at git revert
but I'm not confident that I fully understand how it works. So... I'm really hoping for help on how to resolve this.
Thanks in advance.