设置完毕某个工程的忽略文件后,点保存并关闭 打开Sourcetree中的终端 执行以下命令并提交推送后 忽略文件即可生效 git rm -r --cached . git add . git commit -m '描述'