I’m working on a small project with one other developer and we’re having a bit of a situation. We’re both familiar with SVN, but Git is new to the both of us.
We’re working on a single branch in our repository, each working on different aspects of our project.
What happened was he commit something, then I commit something, had conflicts (In designer files, as it tried to put both of our new files in the same “spot”), and as I resolved them, I must have missed something but now it’s not working. I managed to somehow get the files into a working state, and continued on my merry way, adding more things that aren’t affected by the bad conflict resolution.
So it looks like.
A(Good) -> B(Bad) -> C(Trying to fix) -> D(Revert Bad commit) -> A -> E (Completely new files) -> F(Completely new files) -> G(Other dev first commit since big problem, introduces more problems and conflicts.)
What I want to do basically, is go back to A. and merge in my B, E, and F commits, at which point the other dev can commit G. At this point I don’t know what happened between B and E, so I’d rather just ditch it, as it was just me trying to resolve the problem. However, when I go back to A, I don’t get prompted for the same conflicts I did when I originally committed B.
Please god help me.
Try checking out to your A commit by using the SHA reference, create a new branch from A and cherry pick B, E and F by using the cherry-pick command in git.