git make changes in .gitignore work code example
Example 1: git ignore not saving changes
git rm -rf --cached .
git add .
Example 2: how to avoid some files changes to not come in git status
git rm --cached <file>
git rm -rf --cached .
git add .
git rm --cached <file>