我知道reflog
的压缩版本存储在.git/packed-refs
中,但实际的reflog存储在哪里?当我们输入git reflog
时,git如何恢复历史记录?
我知道reflog
的压缩版本存储在.git/packed-refs
中,但实际的reflog存储在哪里?当我们输入git reflog
时,git如何恢复历史记录?
.git/logs/<refname>
中。例如,对于名为master
(例如refs/heads/master
)的分支,您需要使用.git/logs/refs/heads/master
。HEAD
是异常的,它位于.git/logs/HEAD
。
.git/packed-refs
包含的是普通的引用,而不是 reflog。 - Edward Thomson