有次我手賤執行git clean -fdx,把我整個項目都刪了,慌得我一批,幸好之前有commit的操作,雖然沒push
恢復步驟1:
1.執行git reflog
2.git reset --hard 6e8d3e3(指定commit的sha碼)
即可恢復!!!!
如果效果還不理想的話,採用終極命令
git fsck --lost-found
出自https://www.cnblogs.com/hope-markup/p/6683522.html
有次我手賤執行git clean -fdx,把我整個項目都刪了,慌得我一批,幸好之前有commit的操作,雖然沒push
恢復步驟1:
1.執行git reflog
2.git reset --hard 6e8d3e3(指定commit的sha碼)
即可恢復!!!!
如果效果還不理想的話,採用終極命令
git fsck --lost-found
出自https://www.cnblogs.com/hope-markup/p/6683522.html