代码已经push, 要修改.gitignore后如何操作 三行家代码解决,哈哈哈 git rm -r --cached . git add . git commit -m "update .gitignore" git push Ref: 1、https://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository