How can I merge a state before wrong commits into the current head in Git?
Mistakenly merge by a other person resetted my change on the server, after I fetched and merged the remote master branch, my changes are locally gone. In the meantime are more correct commits are pushed to the remote server and stay on the current head of the master branch.
I need to merge the state before the wrong merge occured into my current master head.
How can I achive that?
I have tried the answer by @Drecker.
git revert -m 2 <SHA_hash_of_merge_commit>
and I have now my correct file content back, but I loose the correct file content from the second person. I committed it, but don't pushed it. I created a new branch restore
from that. Now the second person content is correct in the remote master
branch and my content is correct in the local restore
branch.
How can I re-merge both branches again, so that I have the correct contents from both branches?