Recovering Lost Commits After Push
I could use some help with a recovery strategy. Somehow we ended up in a position where one commit dropped about 3 days worth of commits. And then got pushed. The committer isn't sure whether he did forced the push or what, but now we're in this position. And about 10 additional commits have been pushed since the "bad" one.
All of the old commits are there and I could piece everything back together, but I'm hoping that Git can help me out. I suppose I could cherry-pick the range of commits between point A and point B, but is there anything better? Most, but not all, of the changes are local to one directory and I'd rather not manually inspect each one.
What's the right approach here remembering that everything has been pushed upstream?
git reset --hard <one commit before the bad commit> git cherry-pick <the range of commits you've lost> git pull
This way you simulate that you are on the last good commit (with the reset). Then you create new commits locally (cherry-pick). Now you pull in changes (and maybe merge conflicts).