我不知道这个问题是应该转移到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
删除,但没有成功,它显示了there is no such file or directory
!但是文件总是在那里!
所以我尝试了:
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