方法就是下面这两行代码 1.git reflog(查看你提交代码的记录) 2. git reset --hard 版本号(前面的黄色字体就会版本号,例如git reset --hard eb30a960 )