How to recover after i execute :git reset --hard HEAD

后端 未结 6 799
梦如初夏
梦如初夏 2020-12-31 11:37

I made a terrible mistake and execute \"git reset --hard HEAD\", all day\'s the local modification lost, how can i recover it?

Thanks millions

6条回答
  •  半阙折子戏
    2020-12-31 12:23

    You can use git reflog. It will show HEAD history. You can pick the hash that represents the HEAD status before the git reset --hard and use this hash in another git reset --hard .

提交回复
热议问题