比如bin文件夾
it rm -r -n --cached "bin/" //-n:加上這個參數,執行命令時,是不會刪除任何文件,而是展示此命令要刪除的文件列表預覽。
git rm -r --cached "bin/" //最終執行命令.
git commit -m" remove bin folder all file out of control" //提交
git push origin master //提交到遠程服務器
可以修改 .gitignore
文件
添加 bin/
並提交 .gitignore
文件到遠程服務器,這樣就可以不對bin目錄進行版本管理了。轉載地址 http://www.tuicool.com/articles/NfEzeq