I was following the More color attributes section graphics on the Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global
old = red strike
new = green italic
error: invalid color value: red strike fatal: bad config variable
'color.diff.old' in file '/Users/xyz/.gitconfig' at line 21
For me the same problem occurred due to IntelliJ using an old version of git.
In the IntelliJ preferences go to Version Control > Git.
Find the Path to Git executable.
Clicking the Test button next to it should show you the version of the binary used by IntelliJ.
If it is below 2.10 you might want to change the path to the one used from the command line.
You can find the correct path by calling
which git on the command line.