git代码被覆盖如何恢复

3,210 阅读1分钟

方法就是下面这两行代码

1.git reflog(查看你提交代码的记录)

2. git reset --hard 版本号(前面的黄色字体就会版本号,例如git reset --hard eb30a960 )

我的图片