Why does git reflog show multiple batches of HEADs

筅森魡賤 提交于 2019-12-12 02:14:39

问题


I previously asked this but I closed it as it was a close duplicate of the same issue with git log. Now I have a similar question that why does git reflog show 'different lists of HEAD logs'?

If I use keyboard to go down I see from HEAD0 all the way to HEAD 247 which is where I cloned my repo. which sounds very logical and understandable YET I see another long list that is from HEAD 1 to HEAD 225 & then another that is from HEAD0 to HEAD 225 and then another that is from HEAD0 to HEAD 90. Why are there various versions of history? Or are they something else entirely?

Bash Output sample

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

Why don't I only and only see:

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

来源:https://stackoverflow.com/questions/39709795/why-does-git-reflog-show-multiple-batches-of-heads

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!