Pagination for output of git commands
We can enable pagination for output of git commands on a one off or permanent basis depending on our needs.
To enable paging on a one off basis, pass the
--paginate switch to the git command you are running:
git -p help -aSee 'git help <command>' to read about a specific subcommandMain Porcelain Commandsadd Add file contents to the indexam Apply a series of patches from a mailboxarchive Create an archive of files from a named treebisect Use binary search to find the commit that introduced a bugbranch List, create, or delete branchesbundle Move objects and refs by archivecheckout Switch branches or restore working tree filescherry-pick Apply the changes introduced by some existing commitscitool Graphical alternative to git-commitclean Remove untracked files from the working treeclone Clone a repository into a new directorycommit Record changes to the repositorydescribe Give an object a human readable name based on an available refdiff Show changes between commits, commit and working tree, etcfetch Download objects and refs from another repositoryformat-patch Prepare patches for e-mail submissiongc Cleanup unnecessary files and optimize the local reposit
Here we passed the
-p switch to the
git help command, and the resulting output is paginated.
To enable paging, update the
pager.status configuration and set it to true:
git config --global pager.status true
Note that if the
--paginate switch is passed to the command line, it will take precedence over the
pager.status configuration setting.