git exclude file code example
Example 1: .gitignore
node_modules
.DS_Store
.env
Example 2: git exclude folder
directory_to_exclude/
Example 3: how to git ignore a file
git config --global core.excludesfile ~/.gitignore_global
Example 4: git ignore not saving changes
git rm -rf --cached .
git add .