Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个分支,master 和 b1。当我在 b1 上时,“git reflog show”会显示对 b1 的所有更改。但是,在我切换到 master 并运行 'git reflog show b1' 后,它会显示一些不同的东西。'git reflog' 的联机帮助页没有解释 arg <ref> 如何影响输出。
它显示了<ref>. 如果<ref>未提供,则显示 HEAD 的历史记录。请注意,这不是HEAD指向的,而是 HEAD 本身。因此,当您git reflog show在 b1 上执行一段时间时,它显示的是 HEAD 的历史,而不是 b1。当你这样做时git reflog show b1,它会显示 b1 的历史。所以这就是差异的来源。
<ref>
git reflog show
git reflog show b1