如果你像我今天一样发现自己处于这种情况,这些答案都不起作用。不管有多少 git reset --hard 是我干的,什么都没有。我的回答(不是官方的)是:
git reset --hard
git reflog --all