当我执行 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)
Run Code Online (Sandbox Code Playgroud)
然而,当我这样做时ls -al,我没有看到任何看起来像的东西\357\275\236
您可能有一个名称中包含 UTF-8 字符的文件。跑步
git config core.quotepath false
更改 git 的行为并向您显示操作系统可能会向您显示的文件名。
这是处理 Mac OS X HFS+ UTF-8 编码文件和 git 的解决方法!这个问题的答案也包含了很好的解释。