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 中即可。
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 中即可。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。