不知何故,我不小心提交了一个 .sln.docstates 文件。现在我将它添加到 gitignore,但它不会被忽略。我想这是因为我已经犯过一次了。不知道什么时候!
是否有可能使这个 gitignore 规则起作用? 如何从我的存储库中删除它?
*.sln.docstates
最佳答案
这样删除它:
$ git rm --cached \*.sln.docstates
...那么应该尊重 .gitignore。
关于c# - Git 从存储库中删除 *.sln.docstates,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6461075/