打开终端,进入项目工程根目录,输入: git rm -r --cached . 关闭工程,重开就没有那个警告了。 来源于:http://uchinoinu.hatenablog.jp/entry/2016/07/10/183449