add folder to git global ignore code example
Example 1: set global git ignore
touch ~/.gitignore
git config --global core.excludesfile ~./gitignore
Example 2: git ignore global
# .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.*