如果您想跟踪 git 存储库中发生的更改,您可以使用 https://git-scm.com/docs/git-reflog例如如果一个分支被本地/远程意外删除,如何恢复它?
但据我了解,git reflog 仅在本地存储库的上下文中才有意义。这意味着每次你做一个全新的克隆时,所有分支的 git reflog 都是空的。对吗?
最佳答案
是的,没错。如果你克隆一个项目,reflog 是空的,第一个条目是例如:
fd7cb08 HEAD@{0}: clone: from https://github.com/xxxx
Reference logs, or "reflogs", record when the tips of branches and other references were updated in the local repository.
关于Git reflog 并做一个新的克隆?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39125225/