global git ignore at root of linux code example
Example 1: git global ignore
#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, ...)
Example 2: how to use gitignore to ignore a folder
You can ignore entire directories, just by including their paths and putting a / on the end:
1
2
node_modules/
logs/