Passing --no-pager
to git
prevents the default less
pager.
git --no-pager diff
Alternatively passing -F
to less
will tell it to not page if the output fits on a single screen.
Piping it to cat
is also possible, but that will remove syntax highlighting.