Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 4
    If you want to avoid changing your global config (ie you just want the colors changed for a one-off) you can pass the parameter via -c eg: git -c color.diff.new=cyan diff <file1> <file2> shows all additions in cyan
    – Cole
    Commented Feb 17, 2021 at 3:14
  • 1
    Nice, simple way to custom color your terminal anytime Commented Feb 20, 2021 at 21:21
  • 2
    @jasonleonhard Yep, I also forgot to add for complex specifiers you just need to add quotes. eg for bold cyan: git -c color.diff.new="cyan bold" diff <file1> <file2>
    – Cole
    Commented Feb 21, 2021 at 5:37
  • @caot, what did you try exactly? Commented May 3, 2021 at 21:44