User global .gitignore

Many IDEs create per-project cache directories with metadata relevant to the IDE configuration for that project. Similar to user global .gitattributes, instead of editing the .gitignore file for each repository, ignore directories in Git for all repos a particular user has as follows, for any operating system.

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

Edit ~/.gitignore file to contain items like the following.

*.orig
git merge conflict files. To not generate git merge conflict .orig files:
git config --global mergetool.keepBackup false
.vs/
Visual Studio cache
.vscode/
Visual Studio Code cache
.idea/
PyCharm cache
pip-wheel-metadata/
pip cache
.mypy_cache/
mypy cache
.DS_Store
macOS Finder cache
*.pyc
Python compiled files
*.orig

.vs/
.vscode/
.idea/