git- strange characters in output (msys-git)

不打扰是莪最后的温柔 提交于 2019-12-11 02:57:33

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/1077382/git-strange-characters-in-output-msys-git

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!