Skip to main content
Replace fenced code blocks with indented ones, single quotes with backticks
Source Link
Chris
  • 134.3k
  • 122
  • 297
  • 272

When I run 'git diff'git diff, the header part of each diff comes out in white text. SinceSince I'm using a light background it is hard to read, so I want to change it.

I have found that I can change other colors in the diff output like this (in .gitconfig):

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

But I can't figure out what to put there for the header color. EvenEven better, is there someplace where all of the default git config settings are documented?

By 'diff header' I mean lines like this:

diff --git a/README.md b/README.md
index f102026..c5e3428 100644
--- a/README.md
+++ b/README.md

When I run 'git diff', the header part of each diff comes out in white text. Since I'm using a light background it is hard to read, so I want to change it.

I have found that I can change other colors in the diff output like this (in .gitconfig):

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

But I can't figure out what to put there for the header color. Even better, is there someplace where all of the default git config settings are documented?

By 'diff header' I mean lines like this:

diff --git a/README.md b/README.md
index f102026..c5e3428 100644
--- a/README.md
+++ b/README.md

When I run git diff, the header part of each diff comes out in white text. Since I'm using a light background it is hard to read, so I want to change it.

I have found that I can change other colors in the diff output like this (in .gitconfig):

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

But I can't figure out what to put there for the header color. Even better, is there someplace where all of the default git config settings are documented?

By 'diff header' I mean lines like this:

diff --git a/README.md b/README.md
index f102026..c5e3428 100644
--- a/README.md
+++ b/README.md
Source Link
TimK
  • 4.7k
  • 2
  • 28
  • 27

How do you customize the color of the diff header in git diff?

When I run 'git diff', the header part of each diff comes out in white text. Since I'm using a light background it is hard to read, so I want to change it.

I have found that I can change other colors in the diff output like this (in .gitconfig):

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

But I can't figure out what to put there for the header color. Even better, is there someplace where all of the default git config settings are documented?

By 'diff header' I mean lines like this:

diff --git a/README.md b/README.md
index f102026..c5e3428 100644
--- a/README.md
+++ b/README.md