I find it quite hard to make sense of the output from
git diff. It is somewhat off-putting and ugly for me.
diff-so-fancy is an open source project to solve this problem and help make your diff much less uglier.
There are a lot of ways to install it but I prefer to install all my tools with Brew. So run the following in your terminal:
1$~ brew install diff-so-fancy
diff-so-fancy, you have to set it up globally. Run the following:
1$~ git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
This will change your
~/.gitconfig like so
1[core] 2 ... // other settings 3 pager = diff-so-fancy | less --tabs=4 -RFX
When you run
git diff, you will noticed how much of an improvement that
brings. There are a few more customizations that can be done. Try it on your own.