git删除中文文件

git中出现如下代码时,是因为文件中包含中文。而且我们也无法用 git rm name 命令来删除该文件。

deleted: "chrome_plugin/source_file/iHub345234250347272277345255246344271240347263273347273237.html"

  

这是git不支持中文所致,我们可以用如下代码让git不对中文文件名进行处理:

$ git config --global core.quotepath false

然后你再运行 git status ,你可以看到会有中文显示出来,然而,现在你仍然不可以使用 git rm name 来删除该文件。

你可以运行 git add -u 将所有改动的文件提交到暂存区,这样之后你无需使用 git rm name 命令,只需提交,就可以了。

$ git add -u

  

原文地址:https://www.cnblogs.com/ayseeing/p/4013807.html