无法git摆脱git中没有跟踪的文件 - 文件说没有这样的文件或目录

时间:2018-06-10 05:55:45

标签: git

您好我试图在Windows 10上的Ubuntu中的Bash上用git删除未经跟踪的文件。我能够推/拉没有问题。

当我去

git status

我得到以下内容:

Untracked files:
 (use "git add <file>..." to include in what will be committed)

    /Home/SignInButton.js

nothing added to commit but untracked files present (use "git add" to track)

如果我进入目录,我会

-rwxrwxrwx 1 root root  655 Jun  9 22:43 LogInButton.js
-????????? ? ?    ?       ?            ? SignInButton.js

我尝试过以下命令

git rm                No change
git checkout -- .     No change
git reset --hard      Reset but still the same warning
git clean -f -d       I get the "No such file or directory"
git stash             No change

我还应该尝试什么?

1 个答案:

答案 0 :(得分:1)

文件列表中的大量?表示Linux子系统试图清除资源的情况,但子系统之外的东西仍在保留它。

在Linux子系统内外都关闭所有打开的文件句柄后,删除操作应该完成。