git代码被覆盖如何恢复
2022-01-26 本文已影响0人
autumn_3d55
方法就是下面这两行代码
1.git reflog(查看你提交代码的记录)
git reflog
image.png
2. git reset --hard 版本号(前面的黄色字体就会版本号,例如git reset --hard eb30a960 )
git reset --hard 556b1bb
git reflog
image.png
git reset --hard 556b1bb