Reputation: 1509
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?
Upvotes: 10
Views: 4725
Reputation: 168
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?
Upvotes: 7
Reputation: 71
I am not sure of how to get all the differences to stdout without having to press enter, but this may help you.
git diff --output=<file_name> [--]
cat file_name
The above command will store all the differences in the 'file_name' file and making the terminal show the file can help you see all the differences in one go.
Upvotes: 0