1

在尝试使用 Git 时,我将文件的内容从 更改1100,并且能够提交并在日志中看到它。但经过更多的测试和

git checkout <some_hash>      // I think this is to revert the whole repo to a 
                              //     certain state

git checkout master           // And this is to change the repo to the most 
                              //     current state

提交历史丢失在git log. 发生了什么——提交是否已经进入另一个分支以及如何查看或取回它?

4

1 回答 1

4

如果不确切知道您做了什么,就很难确切地说出提交的去向。但是,该git reflog命令将显示当前分支头在过去的位置,包括可能不再在历史记录中的提交。

于 2012-08-27T03:23:12.810 回答