1)要先进入项目包所在的文件夹git
2)git rm -r --cached . ;//后面有个点3)git add . ;后面有个点4)git commit -m "update .gitignore";//注意中英文符号it