0

I'm using the latest preview of the Cmder console emulator and the Git for Windows 2.20.1.

I followed the Pretty git branch graphs question response where git tree aliases are presented and defined my variant of the alias in ~/.gitconfig:

[alias]
tree = log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset) %C(auto)%d%C(reset)\n%x09%x09%x09%C(black)%s %C(reset)'

Basically, this renders commit message in black as it was faded away. It works well in the Git Bash console (right-hand side on the screenshot), while in the Cmder (left-hand side), the commit messages in black are not visible (of course, they are there, if I select the output):

enter image description here

What tweaks to the colors would be required to make the left-hand side console look similar to the right-hand side?

That is, to make the commit messages in black visible.

To be honest, I don't know if this is issue with Cmder or ConEmu configuration. I have tried all the color themes coming with Cmder, but without any improvement.

Maximus
  • 10,751
  • 8
  • 47
  • 65
mloskot
  • 37,086
  • 11
  • 109
  • 136

1 Answers1

2

That is because when you run the command in posix terminal, black is treated as rgb(0,0,0). But when you run git in WinAPI terminal, the output result is "color with index 0".

You may try posix mode in ConEmu too, but it's not so easy to setup for new users.

The simplest way:

  1. change color of index 0 to 0 0 0

enter image description here

  1. and change background color to appropriate value.

enter image description here

Maximus
  • 10,751
  • 8
  • 47
  • 65
  • 1
    I confirm this works. One extra small step was required in my case: the "Placement" must be changed t "Stretch" (or "Tile"). Yes, even if the "Path" is just a color. Other placements do not make the trick work. Thanks! – mloskot Jan 21 '19 at 08:49