I will try my best to concisely describe my current situation, and would be most grateful for some advice.
I merged in a big feature branch of code this morning that turned out to have a critical error. In order to undo it, my coworker reverted the merge (which had several commits) in GitHub and after pulling, all appeared to be well.
After making some tweaks to the feature branch, I wanted to make sure it could go in again, so I used 'git merge master' on my feature branch (like I always do) to make sure everything is up to date.
Surprisingly, the result of that was to delete all of the new code that I am needing to merge back in to the master repo!
Is this due to the revert that occurred on the branch? Looking through the git log, I can see that all of the commits are there still. And even more strange, the pull request in github doesn't show any of the original commits in the diff, only what I have changed since the revert.
Can someone help me make sense of this?
I know some people have suggested simply reverting the revert, but I need to go back in clean, as the changes I made deal with the structure of much of the code.
git reflog
in your console. it will show you the full history of what has been done to your repo (not branch but full repo).checkout the desired point in time and continue from there. – Diophantus