- Create a file that will be your global
.gitignore
, for example~/.gitignore
; - Set
core.excludesFile
in git config
git config --global core.excludesFile ~/.gitignore
- Add the settings below to the global settings file
{
"search.useGlobalIgnoreFiles": true,
"search.useIgnoreFiles": true,
}