在 WSL 中通过 Ubuntu 看不到 Git 颜色

标签 git windows-subsystem-for-linux

由于本教程,我修改了 shell 的颜色:
https://medium.com/@jgarijogarde/make-bash-on-ubuntu-on-windows-10-look-like-the-ubuntu-terminal-f7566008c5c2

太好了,不过,我再也看不到我在 GIT 上的事件分支了。

enter image description here

在属性中,我不明白如何选择正确的插槽来修改文本的颜色。

enter image description here

有人会有想法吗?

最佳答案

我很久以前写过这个注册表文件,你可以试试。如果你不介意的话,颜色会稍微调整一下。这对我来说很漂亮。

Windows Registry Editor Version 5.00

; Values stored as 00-BB-GG-RR
;[HKEY_CURRENT_USER\Console\%SystemRoot%_system32_bash.exe]
[HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_1804.2018.817.0_x64__79rhkp1fndgsc_ubuntu.exe]
"CodePage"=dword:000001b5

; BLACK DGRAY
"ColorTable00"=dword:00240A30
"ColorTable08"=dword:00cfd7d3
; BLUE LBLUE
;"ColorTable01"=dword:00a46534
"ColorTable01"=dword:00cf9f72
"ColorTable09"=dword:00ffbf8e
; GREEN LGREEN
;"ColorTable02"=dword:00069a4e
"ColorTable02"=dword:0034e28a
"ColorTable10"=dword:0068ff9f
; CYAN LCYAN
;"ColorTable03"=dword:009a9806
"ColorTable03"=dword:00e2e234
"ColorTable11"=dword:00ffff68
; RED LRED
;"ColorTable04"=dword:000000cc
"ColorTable04"=dword:002929ef
"ColorTable12"=dword:005252ff
; MAGENTA LMAGENTA
;"ColorTable05"=dword:007b5075
"ColorTable05"=dword:00a87fad
"ColorTable13"=dword:00ff9aff
; YELLOW LYELLOW
;"ColorTable06"=dword:0000a0c4
"ColorTable06"=dword:004fe9fc
"ColorTable14"=dword:006fffff
; LGRAY WHITE
;"ColorTable07"=dword:00cfd7d3
"ColorTable07"=dword:00eceeee
"ColorTable15"=dword:00ffffff

将上述内容保存到扩展名为 .reg 的文本文件中,然后双击该文件。然后就可以看到效果了。

关于在 WSL 中通过 Ubuntu 看不到 Git 颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54197238/

相关文章:

git - 如何在不破坏 future merge 的情况下部分 git cherry-pick?

git - 如何在没有 git 添加它们的情况下进行 git pull

git - Git中分支的两次提交之间的变化汇总

google-chrome - 使用 VSCode WSL Remote,为什么 Chrome Debugger 不会启动 Chrome for Windows?

bash - 在 Windows 上的 Ubuntu 上的 Bash 中复制粘贴

git - 在使用https克隆后,如何SSH git存储库?

git - 仅显示 git 中的冲突解决历史记录

visual-studio-code - VSCode 不断要求我恢复

Linux 子系统 ssh 看不到 id_rsa.pub

python - pycharm 无法在 WSL 上使用远程 ssh python 解释器运行 .py 进行编码