1)要先進入項目包所在的文件夾git
2)git rm -r --cached . ;//後面有個點3)git add . ;後面有個點4)git commit -m "update .gitignore";//注意中英文符號it