Untrack files without deleting them. This removes any changed files from the index
git rm -r --cached .
then
git add .
commit!!
git commit -m ".gitignore is now working"