How can I turn on a pager for the output of git status?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
If git status produces more output than comfortably fits on one screen, you can force Git to send it through a pager such as less. Git already has a paging system, and you can enable it per command, per repository, or globally.
The two most useful answers are either "page this one invocation" or "always page git status." Which one you want depends on whether the long output is occasional or part of your normal workflow.
Page One Command Invocation
For a single run, use Git's paginate flag:
The short form is:
This tells Git to run status through the configured pager for that one invocation. It is the fastest answer when you do not want to change configuration yet.
Turn On Paging For git status Permanently
If you want git status to use a pager by default, configure pager.status:
That changes the behavior for your user account across repositories. If you want the setting only in the current repository, omit --global:
This is useful when one large monorepo needs paging but your smaller repositories do not.
Choose The Pager Program
Git usually uses less by default on systems where it is available, but you can control the pager explicitly with core.pager:
Those less options are a common choice:
- '
-Fquits if output fits on one screen' - '
-Rpreserves color escape sequences' - '
-Xkeeps the content on screen after exit'
Once core.pager is set, git status and other paged commands use that program unless a more specific override exists.
Verify What Git Will Use
If paging does not behave as expected, inspect the relevant config values:
git var GIT_PAGER is especially useful because it shows the effective pager after Git considers its config and environment variables.
Environment Variables Also Matter
Git also respects pager-related environment variables. For a temporary override:
If you already have LESS or PAGER configured in your shell, those can also affect the viewing experience. That is why pager behavior sometimes differs between terminals even when the repository config is identical.
Know How To Turn It Back Off
Sometimes the real issue is the opposite: paging became annoying for a short command. You can disable paging for a one-off invocation:
Or disable it in config:
Knowing both directions makes it easier to experiment without getting stuck in a terminal behavior you dislike.
Why git status May Not Page By Default
Git's paging behavior varies by command, version, and configuration. Commands like git log are famously pager-friendly, while git status may or may not page depending on your setup. That is why forcing pagination explicitly with git --paginate status is the most dependable immediate answer.
For teams that use huge repositories, enabling a pager for status is often worthwhile because the untracked file list and branch summary can become too large for one terminal screen.
Common Pitfalls
One common mistake is setting core.pager but forgetting that pager.status may still be disabled. Another is choosing a pager command that strips color output or behaves awkwardly in the terminal. Developers also sometimes assume git status will always page automatically the same way git log often does, which is not guaranteed across setups. Finally, if the pager exits immediately, that may simply mean the output fits on one screen and the pager options told it to quit.
Summary
- Use
git --paginate statusorgit -p statusto page a single invocation. - Use
git config --global pager.status trueto enable paging forgit statusby default. - Set
core.pagerif you want to choose the pager program and options. - Inspect
git var GIT_PAGERwhen behavior is confusing. - Use
git --no-pager statusorpager.status falsewhen you want to turn it back off.

