reflog 与持久化对象
原片 00:55:02—00:56:02
这当然可以。2015 年,为 multi-tasking,git 增加 worktree。persistent data structure 保留历史,先看一个例子。

merge commit 在对象内容中记录的两个 parent:
parent 755ebd91c1a5bd7a1eee906013f65fc6036ddeb3
parent 531edd8e67359bedc84adfa2e5c6f9c6a83d2cac
Merge branch 'newnew' into new
git reflog 会记录历史。git reset --hard 后,未 add 的内容会丢,但其他对象因为已经持久化,还在文件系统。只要不 git gc,即便 commit 已无引用,或者引用关系弄坏,对象仍可能恢复。

tree object、blob object 仍在,都可能恢复。git reflog 能帮助找回历史,这正是 persistent data structure 带来的能力。