- Install diff-so-fancy via their website (or just run
npm install -g diff-so-fancy
)
- Add the following to your
.gitconfig
file:
[core]
pager = diff-so-fancy | less --tabs=1,5 -R
- I find that these colors work best with it, but it's up to you if you want to add them to your
.gitconfig
or not.
[color "diff"]
meta = "yellow bold"
commit = "green bold"
frag = "magenta bold"
old = "red bold"
new = "green bold"
whitespace = "red reverse"
[color "diff-highlight"]
oldNormal = "red bold"
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
What do the "52" and "22" mean?