git remove file and add to ignore code example
Example 1: git ignore remove
git rm -r --cached .
git add .
git commit -m "Removing all files in .gitignore"
Example 2: how to git ignore a file
git config --global core.excludesfile ~/.gitignore_global