我有一个文件,它自己设定了一个名字:
# file's name (both lines)
companies.yml
companies.yml
# entry in my git working tree
"test/fixtures/companies.yml\342\200\250companies.yml"
由于某些烦人的原因,这个特定项目的工作树充满了其他仍需要组织的文件。我想把上述条目从中移除,但是当我尝试使用 git add "test/fixtures..."
或 git rm "test/fixtures..."
时它会失败:
fatal: pathspec 'test/fixtures/companies.yml\342\200\250companies.yml' did not match any files
我该怎么处理?
Git状态
On branch master
# Your branch is ahead of 'production/master' by 4 commits.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
modified: [other files]
modified: "test/fixtures/companies.yml\342\200\250companies.yml"
git add
和git rm
一个同名的文件。你在哪个平台上? - Fred Foogit checkout -- test/fixtures...
做什么? - Yuval Adam