Visual Studio Code Git不会丢弃文件 [英] Visual Studio Code Git won't discard files
问题描述
我有大约5000个无法丢弃的文件,VSCode不断警告我文件太多.我不确定何时开始跟踪这些文件,但是如果单击丢弃"然后确认丢弃,则什么也不会发生.关于如何解决这个问题有什么想法吗?
I have about 5000 files that I am unable to discard and VSCode keeps warning me that there are too many files. I'm not sure when I started tracking these files, but if I click on discard and then confirm the discard, nothing happens. Any ideas on how I can solve this?
推荐答案
VSCode最近重命名为清除"选项放到放弃" 上.
但这是关于取消当前更改的暂存,而不是删除文件.
VSCode recently renamed the "Clean" option onto "Discard".
But it is about unstaging current changes, not deleting files.
如果文件太多(例如,由于生成了文件,则不应包含在存储库中),只需删除它们,然后记录删除(添加和提交).
这样您就可以进行推送了.
If you have too many files (that should not be part of the repo, for example because they are generated), simply delete them, then record your deletion (add and commit).
Then you will be able to push.
另外,考虑将它们(或它们的父文件夹)添加到.gitignore
文件中.
Additionally, consider adding them (or their parent folder) to a .gitignore
file.
这篇关于Visual Studio Code Git不会丢弃文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!