Recover from git reset --hard?

后端 未结 22 2539
盖世英雄少女心
盖世英雄少女心 2020-11-22 00:52

Is there any way to recover uncommitted changes to the working directory from a git reset --hard HEAD?

22条回答
  •  遇见更好的自我
    2020-11-22 01:34

    I did git reset --hard on the wrong project by mistake (I know...). I had just worked on one file and it was still open during and after I ran the command.

    Even though I had not committed, I was able to retrieve the old file with the simple COMMAND + Z.

提交回复
热议问题