git ignore global

Shell
#Create your global ignore file like a normal .gitignore
#in your home folder.
git config --global core.excludesfile /path/to/home/.gitignore
#Your git now exclude any file declared in that .gitignore
#It's useful for hide your IDE's folder (.idea, .vscode, ...)# .gitignore global
# IntelliJ IDEA
.idea
*.iml
*.iws
.idea-compl
*.sc

# Mac
.DS_Store

# Clojure
.lein-repl-history
.lein-failures
completer.hist
.nrepl-port

# Scala
libsigar-universal64-macosx.dylib

# Custom
*.no-commit.*

Source

Also in Shell: