我之前问过这个问题,但我关闭了它,因为它与git log
. 现在我有一个类似的问题,为什么 git reflog 显示“不同的 HEAD 日志列表”?
如果我使用键盘向下,我会看到从 HEAD0 一直到 HEAD 247,这是我的仓库clone
。这听起来很合乎逻辑且可以理解,但我看到另一个长列表,从 HEAD 1 到 HEAD 225,然后另一个从 HEAD0 到 HEAD 225,然后另一个从 HEAD0 到 HEAD 90。为什么有各种版本的历史?或者它们完全是另外一回事?
Bash 输出示例
7136d2c HEAD@{0}: checkout: moving from master to master
7136d2c HEAD@{1}: checkout: moving from xhh994 to master
7136d2c HEAD@{2}: merge master: Fast-forward
f50e2ef HEAD@{3}: checkout: moving from master to xhh994
// Lots of more lines
7136d2c HEAD@{90}: pull upstream master: Fast-forward
7136d2c HEAD@{0}: checkout: moving from master to master
7136d2c HEAD@{1}: checkout: moving from xhh994 to master
7136d2c HEAD@{2}: merge master: Fast-forward
f50e2ef HEAD@{3}: checkout: moving from master to xhh994
// Lots of more lines
7136d2c HEAD@{225}: pull upstream master: Fast-forward
7136d2c HEAD@{0}: checkout: moving from master to master
7136d2c HEAD@{1}: checkout: moving from xhh994 to master
7136d2c HEAD@{2}: merge master: Fast-forward
f50e2ef HEAD@{3}: checkout: moving from master to xhh994
// Lots of more lines
7136d2c HEAD@{225}: pull upstream master: Fast-forward
7136d2c HEAD@{0}: checkout: moving from master to master
7136d2c HEAD@{1}: checkout: moving from xhh994 to master
7136d2c HEAD@{2}: merge master: Fast-forward
f50e2ef HEAD@{3}: checkout: moving from master to xhh994
// Lots of more lines
7136d2c HEAD@{247}: clone from: github.mycompany.com/myproject
为什么我不只看到:
7136d2c HEAD@{0}: checkout: moving from master to master
7136d2c HEAD@{1}: checkout: moving from xhh994 to master
7136d2c HEAD@{2}: merge master: Fast-forward
f50e2ef HEAD@{3}: checkout: moving from master to xhh994
// Lots of more lines
7136d2c HEAD@{247}: clone from: github.mycompany.com/myproject