Posted on :: Tags: , ,

You can configure a global .gitignore file to ignore files or directories (e.g., .vscode/) in all your repositories. Write it as a standard .gitignore file and save it somewhere, like ~/.gitignore_global. Then, you can use the following configuration to set this as an excludes file:

git config --global core.excludesfile ~/.gitignore_global

Note that the path given to git config should be an absolute path.