0

After reading here as far as I have learned git reflog will show a list of all heads, basically it will keep a history after every checkout you do. Right?

What I don't understand is why are there long empty spaces between the list of heads? Also between lines I see :...skipping... What is that?

See the output of my git reflog

git reflog
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
7136d2c HEAD@{4}: pull upstream master: Fast-forward
f50e2ef HEAD@{5}: checkout: moving from xhh994 to master
f50e2ef HEAD@{6}: checkout: moving from master to xhh994
f50e2ef HEAD@{7}: checkout: moving from hh994 to master
f50e2ef HEAD@{8}: checkout: moving from master to hh994
f50e2ef HEAD@{9}: pull upstream master: Fast-forward
c1deded HEAD@{10}: checkout: moving from gr8987 to master
25ac914 HEAD@{11}: commit: NotificationName changed
c651d22 HEAD@{12}: merge master: Merge made by the 'recursive' strategy.
ec0ff91 HEAD@{13}: checkout: moving from master to gr8987
c1deded HEAD@{14}: pull upstream master: Fast-forward
5a5781e HEAD@{15}: checkout: moving from gr8987 to master
ec0ff91 HEAD@{16}: commit: properly dismissed keyboard
5a5781e HEAD@{17}: checkout: moving from xhh990 to gr8987
b70f51c HEAD@{18}: checkout: moving from x2480 to xhh990
f083ee0 HEAD@{19}: checkout: moving from gr8987 to x2480
5a5781e HEAD@{20}: checkout: moving from master to gr8987
5a5781e HEAD@{21}: checkout: moving from xhh990 to master
b70f51c HEAD@{22}: checkout: moving from master to xhh990
:...skipping...
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
7136d2c HEAD@{4}: pull upstream master: Fast-forward
f50e2ef HEAD@{5}: checkout: moving from xhh994 to master
f50e2ef HEAD@{6}: checkout: moving from master to xhh994
f50e2ef HEAD@{7}: checkout: moving from hh994 to master
f50e2ef HEAD@{8}: checkout: moving from master to hh994
f50e2ef HEAD@{9}: pull upstream master: Fast-forward
c1deded HEAD@{10}: checkout: moving from gr8987 to master
25ac914 HEAD@{11}: commit: NotificationName changed
c651d22 HEAD@{12}: merge master: Merge made by the 'recursive' strategy.
ec0ff91 HEAD@{13}: checkout: moving from master to gr8987
c1deded HEAD@{14}: pull upstream master: Fast-forward
5a5781e HEAD@{15}: checkout: moving from gr8987 to master
ec0ff91 HEAD@{16}: commit: properly dismissed keyboard
5a5781e HEAD@{17}: checkout: moving from xhh990 to gr8987
b70f51c HEAD@{18}: checkout: moving from x2480 to xhh990
f083ee0 HEAD@{19}: checkout: moving from gr8987 to x2480
5a5781e HEAD@{20}: checkout: moving from master to gr8987
5a5781e HEAD@{21}: checkout: moving from xhh990 to master
b70f51c HEAD@{22}: checkout: moving from master to xhh990
5a5781e HEAD@{23}: checkout: moving from xhh990 to master
:

























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
7136d2c HEAD@{4}: pull upstream master: Fast-forward
f50e2ef HEAD@{5}: checkout: moving from xhh994 to master
f50e2ef HEAD@{6}: checkout: moving from master to xhh994
f50e2ef HEAD@{7}: checkout: moving from hh994 to master
f50e2ef HEAD@{8}: checkout: moving from master to hh994
f50e2ef HEAD@{9}: pull upstream master: Fast-forward
c1deded HEAD@{10}: checkout: moving from gr8987 to master
25ac914 HEAD@{11}: commit: NotificationName changed
c651d22 HEAD@{12}: merge master: Merge made by the 'recursive' strategy.
ec0ff91 HEAD@{13}: checkout: moving from master to gr8987
c1deded HEAD@{14}: pull upstream master: Fast-forward
5a5781e HEAD@{15}: checkout: moving from gr8987 to master
ec0ff91 HEAD@{16}: commit: properly dismissed keyboard
5a5781e HEAD@{17}: checkout: moving from xhh990 to gr8987
b70f51c HEAD@{18}: checkout: moving from x2480 to xhh990
f083ee0 HEAD@{19}: checkout: moving from gr8987 to x2480
5a5781e HEAD@{20}: checkout: moving from master to gr8987
5a5781e HEAD@{21}: checkout: moving from xhh990 to master
b70f51c HEAD@{22}: checkout: moving from master to xhh990
5a5781e HEAD@{23}: checkout: moving from xhh990 to master
:...skipping...
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
7136d2c HEAD@{4}: pull upstream master: Fast-forward
f50e2ef HEAD@{5}: checkout: moving from xhh994 to master
f50e2ef HEAD@{6}: checkout: moving from master to xhh994
f50e2ef HEAD@{7}: checkout: moving from hh994 to master
f50e2ef HEAD@{8}: checkout: moving from master to hh994
f50e2ef HEAD@{9}: pull upstream master: Fast-forward
c1deded HEAD@{10}: checkout: moving from gr8987 to master
25ac914 HEAD@{11}: commit: NotificationName changed
c651d22 HEAD@{12}: merge master: Merge made by the 'recursive' strategy.
ec0ff91 HEAD@{13}: checkout: moving from master to gr8987
c1deded HEAD@{14}: pull upstream master: Fast-forward
5a5781e HEAD@{15}: checkout: moving from gr8987 to master
ec0ff91 HEAD@{16}: commit: properly dismissed keyboard
5a5781e HEAD@{17}: checkout: moving from xhh990 to gr8987
b70f51c HEAD@{18}: checkout: moving from x2480 to xhh990
f083ee0 HEAD@{19}: checkout: moving from gr8987 to x2480
5a5781e HEAD@{20}: checkout: moving from master to gr8987
5a5781e HEAD@{21}: checkout: moving from xhh990 to master
b70f51c HEAD@{22}: checkout: moving from master to xhh990
5a5781e HEAD@{23}: checkout: moving from xhh990 to master
b70f51c HEAD@{24}: commit: defaulted Home Screen to Job homeView after app is brought:
Community
  • 1
  • 1
mfaani
  • 33,269
  • 19
  • 164
  • 293
  • @ScottWeldon It is similar but tt only addresses the *skipping*. I am also asking about the big empty lines in between. Did you scroll all the way down? What does the separation of the lines signify? – mfaani Sep 26 '16 at 17:28
  • My assumption was that both issues have the same root cause. If you scroll using arrow keys as mentioned in that answer, does that fix the blank line issue? – Scott Weldon Sep 26 '16 at 17:30
  • @ScottWeldon you mean keyboard as in **not** using mouse? – mfaani Sep 26 '16 at 17:32
  • @ScottWeldon so I used keyboard and there are no skipping or empty spaces. Thanks. Now there is another source of confusion. I see from HEAD0 all the way to HEAD 247 which is where I `clone`d 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? – mfaani Sep 26 '16 at 18:14
  • Okay, glad that helped. In that case, I'd recommend you vote to close your question as a duplicate of the one I mentioned above. For your other issue, I recommend you [ask a new question](//stackoverflow.com/questions/ask). – Scott Weldon Sep 26 '16 at 18:18
  • 1
    @ScottWeldon I closed the question and opened a new one [here](http://stackoverflow.com/questions/39709795/why-does-git-reflog-show-multiple-batches-of-heads). Can you take a look? – mfaani Sep 26 '16 at 18:23

1 Answers1

2

The blank lines and the :...skipping... lines are printed by the pager. You see these lines only when you give the pager an instruction to scroll, and then you later use the scrollbar of your terminal to go back to see "off-screen" output in your terminal.

If you do not use the pager, e.g., using git --no-pager reflog, you will not see these lines.

j6t
  • 9,150
  • 1
  • 15
  • 35
  • @Honey that's the thing that lets you go through the output of git commands page-by-page. Try `git --no-pager reflog` to see the difference. The pager is not built into the git commands. By default, it is the command `less`, but it could be changed by setting the environment variables `PAGER` or `GIT_PAGER`. – j6t Sep 26 '16 at 18:50