git提交文件时,这种带有双引号名字是中文的文件怎么提交上去?
删除的文件根本无法提交
###你这是啥终端啊?无法输入和显示中文吗? 正常来说, git add 测试文件.txt
中文文件名是可以直接操作的啊.
git 默认中文文件名是 \xxx\xxx 等八进制形式
是因为 对0x80以上的字符进行quote
只需要
git config core.quotepath false??--global
core.quotepath设为false的话,就不会对0x80以上的字符进行quote。中文显示正常
我还是建议用图形工具会方便些
比如https://desktop.github.com/ 之类的
以前碰到的中文问题的统一处理方法:
git config --global core.quotepath false
git config --global gui.encoding utf-8
git config --global i18n.commit.encoding utf-8
git config --global i18n.logoutputencoding utf-8
然后设置环境变量
Windows 下为:
set LESSCHARSET=utf-8
Linux、Mac 下为:
export LESSCHARSET=utf-8
这个设置最好加到系统环境变量里面去。