git-输出中出现奇怪的字符(msys-git)
我正在使用 msys-git 并注意到在执行 git pull 后,我经常在输出中收到奇怪的字符。 我认为这些是某些终端可能理解的某种控制字符,但在标准的 Windows 命令提示符中,它们会导致以下结果:
Source/MidiLib/AudioChannelMixer.cpp ←[m | 6 ←[32m+←[m
Source/MidiLib/AudioEnvironment.cpp ←[m | 4 ←[32m+←[m
Source/MidiLib/EventIDs.h ←[m | 1 ←[32m+←[m
Source/MidiLib/MidiAssignable.cpp ←[m | 207 ←[32m+++++++++++++++++++++++++←[m←[31m---←[m
Source/MidiLib/MidiAssignable.h ←[m | 39 ←[32m+++++←[m←[31m-←[m
Source/MidiLib/MidiAssignmentsDlg.cpp ←[m | 101 ←[32m++++++++++++←[m←[31m--←[m
这并不是真正的问题,但很烦人......有没有办法禁用这些字符并获得干净的输出?
I'm using msys-git and notice I often get strange characters in the output after doing a git pull. I presume these are some sort of control characters that some terminals might understand but in a standard windows command prompt they result in this:
Source/MidiLib/AudioChannelMixer.cpp ←[m | 6 ←[32m+←[m
Source/MidiLib/AudioEnvironment.cpp ←[m | 4 ←[32m+←[m
Source/MidiLib/EventIDs.h ←[m | 1 ←[32m+←[m
Source/MidiLib/MidiAssignable.cpp ←[m | 207 ←[32m+++++++++++++++++++++++++←[m←[31m---←[m
Source/MidiLib/MidiAssignable.h ←[m | 39 ←[32m+++++←[m←[31m-←[m
Source/MidiLib/MidiAssignmentsDlg.cpp ←[m | 101 ←[32m++++++++++++←[m←[31m--←[m
It's not really a problem, but annoying... is there a way to disable these characters and get a clean output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
git config --global color.ui false 应该这样做,因为这些字符负责更改文本颜色(Windows 控制台不支持)。
git config --global color.ui false
should do it as those characters are responsible for changing the text color (which is not supported by the Windows console).