改动过.gitignore文件之后,在repo的根目录下运行:

gitrm-r--cached.

gitadd.

之后可以进行提交:

gitcommit-m"fixeduntrackedfiles"