Too many active changes in VSCode

Viewed 396

When there's a directory with a particularly large amount of files (ex. node_modules), VSCode will complain that there are too many active changes. It's simple enough to add the directory to .gitignore, however, the git tab in VSCode gets stuck loading, and I'm unable to view any relevant changes unless I completely restart VSCode.

Is there a way to refresh the git tab in VSCode without completely restarting the application? The refresh button at the top of the git tab seems to have no effect.

I'm using Microsoft's Remote Development extension if it makes any difference.

1 Answers

You can ask VSCode to totaly ignore some files/directories from being displayed/watched from your project.

To do so, at the root of your projects create a .vscode folder with a settings.json file in it. This file will contains VSCode related configuration proper to this project only.

In this settings.json, add:

{
     "files.exclude": {
          "**/node_modules/": true,
          "another_large_folder_to_ignore": true
     },
     "files.watcherExclude": {
          "**/node_modules/": true,
          "another_large_folder_to_ignore": true
     }
}
Related