Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make git diff show everything without having to press enter to scroll down?

In my new computer (Mac), if I do a git diff, it will only show as much diffs as the height of my terminal window. I then have to press enter to "scroll down" to see all the other changes.

In my old computer, when I did a git diff, it outputted the entire git diff at once and I was able to use the scroll button on the mouse to see everything.

How do I change git settings to achieve the second behaviour?

like image 765
Fuad Avatar asked Apr 07 '26 08:04

Fuad


1 Answers

git --no-pager diff branch1 branch2

Disabling the pager removes the need to hold the enter key and shows all results immediately.

Answer is taken from the linked thread, but this question & the comments below it allowed me to find my way to the answer by searching. How do I prevent 'git diff' from using a pager?

like image 140
Peter Out Avatar answered Apr 08 '26 22:04

Peter Out



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!