I have installed the official windows git distribution, and I installed a recent mingw, and into that the mintty terminal. Then I have copied my git installation to this mingw installation, and now it works from within mintty. My only problem is that the git output is not colored. I suspect that this is because the windows git port tries to use the windows console color thingie and not the ANSI color codes which mintty would be able to interpret. Is it possible to make git use the ANSI color codes instead?
(I have tried a cygwin setup prior to this, but the performance was very, very bad, and I could not find any solution to that).
from git-config:
If this is set to always, git-diff(1), git-log(1), and git-show(1) will use color for all patches. If it is set to true or auto, those commands will only use color when output is to the terminal. Defaults to false.
It looks like git isn't treat mintty as terminal. For me using always instead of true/auto helps:
[color]
status = always
Forcing color by adding --color flag to diff command work as well (with diff=true):
git diff --color
It's simple. Config git to always show color in any ui.
git config --global color.ui always
Works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With