Search code examples
gititerm

Git results in another screen rather than under the command


I user Mavericks and iTerm.

When I run any Git commands, it displays the result in another screen rather than under the command. It used to be under the command but one day it started using other screen as you can see in the image.

enter image description here

I have to type q to go back.

How can I change this? I want to display the results under the Git commands.


Solution

  • Git is using a pager to show the status in your screenshot. Disable the pager to get rid of this behaviour, e.g.

    git --no-pager ...
    

    There are also configuration options to disable the pager for individual commands, or you can change the flags to the pager so it immediately exists if there's less than one screen of output.