1.git rm -f --cached 文件路径(比如项目中target文件下的内容 git rm -f --cached targe) 2.重新将目录添加到.ignore文件中 3.commit 然后push