Ctrl+P
This VSCode extension adds additional functionality to the .gitignore setting added to VSCode v1.68 (May 2022) which provided the option of hiding of files that are excluded in a .gitignore file from the explorer view.
.gitignore
ctrl-shift-i
command-shift-i