First:
git rm -r --cached .
git add .
Then:
git commit -am "Remove ignored files"
#---------------------
Or as a one-liner:
git rm -r --cached . && git add . && git commit -am "Remove ignored files"
git rm --cached <filename>
git commit -m "<Message>"