救命用的 git reflog(恢复 git reset –hard)
今天不小心手贱没有 push 到 remote 就执行了 git reset –hard xxxx,然后新提交的代码都没了。。。。。
两天的工作量啊!!
在万能的度娘的帮助下找到了 git reflog 这个救命用的命令
1 | dcf7d96 HEAD@{5}: reset: moving to dcf7d96a348faa49e892b4f2d67c2b1dff342b50 |
执行 git reset –hard eaef723 就可以恢复到需要恢复的 commit 了