当我这样做的时候 git status
# On branch inline
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "\357\275\236"
# nothing added to commit but untracked files present (use "git add" to track)
但是,当我执行ls -al
时,我看不到任何类似\357\275\236
答案 0 :(得分:4)
你的名字可能有一个UTF-8字符的文件。运行
git config core.quotepath false
更改git的行为并显示操作系统可能呈现给您的文件名。
这是workaround to deal with Mac OS X HFS+ UTF-8 encoded files and git!这个问题的答案还包括一个很好的解释。
答案 1 :(得分:0)
如果您不想要该文件并且不关心如何列出该文件,请执行以下操作:
git clean -df
应该摆脱它。确保您没有任何其他工作正在进行中。您也可以先使用git gui
进行检查,以获得乐趣。
希望这有帮助。
答案 2 :(得分:0)
我在Windows上使用 Smartgit UI + Msysgit ,在 Bitbucket 中使用远程存储库。
此外,我无法从本地存储库中删除任何非ascii文件名
所以我尝试将这些文件从Bitbucket 和拉源代码中移除到我的本地存储库并且工作正常!