Skip to content

color.ui is not working as expected #5907

@JohnLBevan

Description

@JohnLBevan

Existing issues matching what you're seeing

Git for Windows version

git version 2.51.1.windows.1
cpu: x86_64
built from commit: 1454f0a9c4a3a22fb3fd7cc33f76f88cd65ced41
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.16.0
OpenSSL: OpenSSL 3.5.4 30 Sep 2025
zlib: 1.3.1
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1

Windows version

Windows 11

Windows CPU architecture

x86_64 (64-bit)

Additional Windows version information

Microsoft Windows [Version 10.0.22631.6060]

Options set during installation

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled

Other interesting things

ANSI colour codes proven to work by running "e[31mREDe[0m" in pwsh/powershell.

git config --global --list gives:

core.sshcommand='C:\Windows\System32\OpenSSH\ssh.exe'
core.autocrlf=false
core.longpaths=true
core.editor=code -w -n
core.pager=less -FRX
user.name=REDACTED
user.email=REDACTED
user.signingkey=~/.ssh/id_ecdsa.pub
safe.directory=*
gpg.format=ssh
gpg.ssh.allowedsignersfile=~/.ssh/allowed_signers
commit.gpgsign=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
diff.tool=vscode
difftool.vscode.cmd=code -w -n --diff $LOCAL $REMOTE
merge.tool=vscode
mergetool.vscode.cmd=code -w -n --merge $REMOTE $LOCAL $BASE $MERGED
init.defaultbranch=main
color.ui=auto
color.error=red bold

Git.exe is at: %appdatalocal%\Programs\Git\cmd\git.exe
.gitconfig is at: %UserProfile\.gitconfig

Terminal/shell

PowerShell

Commands that trigger the issue

git checkout nonExistantBranch

Expected behaviour

Output error: pathspec 'nonExistantBranch' did not match any file(s) known to git in red

Actual behaviour

Output error: pathspec 'nonExistantBranch' did not match any file(s) known to git in white (terminal default)

Repository

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions