配置gitignore后使其生效命令 改动过.gitignore文件之后,在repo的根目录下运行: C代码 git rm -r --cached . git add . 之后可以进行提交: C代码 git commit -m "fixed untracked files"