刪除不存在的文件有資料表明git的狀態顯示:從混帳
git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
"src/HomeBundle/Entity/\320Apartments.php"
"src/HomeBundle/Repository/\320ApartmentsRepository.php"
"src/HomeBundle/Resources/config/doctrine/\320Apartments.orm.yml"
nothing added to commit but untracked files present (use "git add" to track)
我想從我的計算機中刪除這些文件,因爲我創造了他們意外
我嘗試執行:
git rm "src/HomeBundle/Entity/\320Apartments.php"
fatal: pathspec 'src/HomeBundle/Entity/\320Apartments.php' did not match any files
git rm '"src/HomeBundle/Entity/\320Apartments.php"'
fatal: pathspec '"src/HomeBundle/Entity/\320Apartments.php"' did not match any files
rm '"src/HomeBundle/Entity/\320Apartments.php"'
rm: cannot remove ‘"src/HomeBundle/Entity/\\320Apartments.php"’: No such file or directory
rm "src/HomeBundle/Entity/\320Apartments.php"
rm: cannot remove ‘src/HomeBundle/Entity/\\320Apartments.php’: No such file or directory
git rm '"src//HomeBundle//Entity//\320Apartments.php"'
fatal: pathspec '"src//HomeBundle//Entity//\320Apartments.php"' did not match any files
git rm "src//HomeBundle//Entity//\320Apartments.php"
fatal: pathspec 'src//HomeBundle//Entity//\320Apartments.php' did not match any files
rm '"src//HomeBundle//Entity//\320Apartments.php"'
rm: cannot remove ‘"src//HomeBundle//Entity//\\320Apartments.php"’: No such file or directory
請幫我找到並移除它們!
非常感謝!雙引號是由git shell簡單顯示的。我的錯誤文件位於/ src/HomeBundle/Entity /中。我通過MC刪除它們。 –
@DmitriyUrazov,很好'MC'的幫助。注意,雙引號('「')在路徑中是可以的,但雙斜槓(」//「)不是。 – JrBenito