Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有本地设置的文件的存储库。我已经将它添加到 .gitignore 和 .git/info/exclude 但它之前被推送到服务器并且 git 想要跟踪它们。
如何排除这个文件?
您可以使用从 git 的索引中删除该文件git rm <filename> --cached
git rm <filename> --cached