我想從git存儲庫中刪除幾個文件。我的倉庫有幾個分支,我也下:從git下刪除檔案庫
git rm --cached filename
git commit -am "deleted filename"
git checkout anotherbranch
我越來越:
error: The following untracked working tree files would be overwritten
by checkout:
output/filename
Please move or remove them before you can switch branches.
Aborting
所以問題是如何從回購刪除文件(小心加入)?我不想通過git跟蹤文件名我打算將這個文件名添加到.gitignore。
最好的問候,
彼得