我不知道这个问题是应该移到 ServerFault 还是属于这里!
在远程 Unix 服务器上工作,我使用 FileZilla
创建了一个文件 file_x.php
。
我在终端上使用 GIT
。
当我执行 git status
时,它会向我显示:
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
some_other_file1.php
some_other_file2.php
file_x.php
^
|__ Note this weird blank space
问题:我想删除这个文件,我从 FileZilla
尝试过,但这没有用,它告诉我没有这样的文件或者目录
!但文件始终存在!
所以我尝试了:
rm -rf file_x.php # This didn't work
sudo rm -rf file_x.php # I'm not from the sudoers
git checkout file_x.php # This didn't do a thing !
git clear -f # This didn't do a thing !
git rm file_x.php
==> fatal: pathspec 'file_x.php' did not match any files
我的问题是,这是什么意思?以及如何删除此文件?
最佳答案
你必须逃离空间:
rm \ file_x.php
关于linux - git status 显示不存在的未跟踪文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53296659/