Colored, numbered, paged git diff
use less -r
to display the colour, but you will need to force git
to use colours because when you pipe git diff
it will difault to --nocolor
git diff --color HEAD~3 HEAD | nl | less -R
If you like to get the line numbers per line, try looking about the solutions suggested here, https://stackoverflow.com/questions/24455377/git-diff-with-line-numbers-git-log-with-line-numbers