gitcommand-lineterminal

git branch ~(END) on terminal?


To note, I'm on Oh-My-Zsh and git 2.17. Whenever I type in git branch, instead of showing me the branches of my git, it shows something like this:

~
~
~
~
~
(END)

I can quit this by pressing 'q' on my keyboard, but I'm still confused as to why this is appearing.


Solution

  • Git pipes long output into what's called a pager by default, which can make it easier to view the output if it doesn't fit on a screen. The ~ characters indicate that those lines were not in the original output, but it's showing them so that you can scroll down past the bottom (i.e. the last line of output can go up to the top of the screen).

    You typically can use the arrow keys to scroll up or down, and can exit by pressing q.