git rm 和 git rm --cached 的區別
git rm file git commit -m "xxx" git push origin master
刪除本地及倉庫中的文件
git rm --cached file git commit -m "xxx" git push origin master
刪除倉庫中的文件,保留本地的文件
如果使用 git rm --cached 刪除了倉庫中的文件,而且后續不想跟蹤此文件,只需將此文件加入 .gitignore 中即可。