Skip to content

Instantly share code, notes, and snippets.

@groyoh
Last active September 22, 2015 07:43
Show Gist options
  • Save groyoh/40a10af181d57402fd58 to your computer and use it in GitHub Desktop.
Save groyoh/40a10af181d57402fd58 to your computer and use it in GitHub Desktop.
Improved git diff output
function gdiff -d "Better git diff"
if [ (count $argv) -eq 0 ]
set argv "HEAD"
end
set output (git diff --cached -U10 $args | wdiff --diff-input -a -n -w '\e[0;35m' -x '\e[0m' -y '\e[0;36m' -z '\e[0m')
print_var $output | less -R
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment