git --no-pager diff
Displays `git diff` output without pagination.
By default, git diff
command outputs long diffs that span multiple terminal screens into a pager (like more
or less
) for easy reading. However, this command disables that feature, outputting the entire diff directly to your terminal. Use it when you want an uninterrupted stream of diff information.
You can also pass filename, commit, or branch parameters to narrow down your diff: git --no-pager diff <commit>
or git --no-pager diff <branch>
or git --no-pager diff <filename>
. For a range of commits, use git --no-pager diff <commit 1>..<commit 2>
method. To see differences with the working directory, use git --no-pager diff --staged
. You can get summary with git --no-pager diff --shortstat
.