文件显示在要提交的文件列表中 GitHub for Windows 而它存在于 .gitignore 中?

File shows up in the list of files to commit in GitHub for Windows whereas it is present in .gitignore?

我用GitHub for Windows。为什么 dstc1/dstc_scripts_src/score.csv 出现在要提交的文件列表中,而它出现在 .gitignore 中?

看起来 .csv 是不小心提交到回购协议中的,所以尽管有 .gitignore 规则,它还是出现了。

如果文件在 repo 中,那么无论 .gitignore 怎么说,它都会显示 - 这是 docs 中列出的行为,您也可以查看注释部分一些细节。

这里是 similar issue,其中包含有关如何摆脱它的步骤。