nullpointer nullpointer - 1 month ago 6x
Git Question

invalid color value: red strike error message [Git + intelliJ]

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

resulting as follows -

[color "diff"]
old = red strike
new = green italic

But now that I load a git project on intelliJ [15.0.3 in case] and after few changes try accessing the
Version Control
window, I get to see the following error -

error: invalid color value: red strike fatal: bad config variable
'color.diff.old' in file '/Users/xyz/.gitconfig' at line 21

This keeps me away from looking at the diffs using the intelliJ-UI. Though I can still access the same using the terminal
git diff

Is there a way to overcome the same? Or some change in intelliJ as well along with the upgradation of git?


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.