git rm --cached
git commit “删除了文件"
git rm --cached will remove the file from the stage.
转:https://www.cnblogs.com/icenter/p/5267696.html