git rm --cached -r .
git add .
git update-index --assume-unchanged
git commit -a -m "forget cached"
git rm --cached -r .
git add .
Very important adding. If file that is ignored would be modified (but in spite of this should be not committed), after modifying and executing git add . it would be added to index. And next commit would commit it to repository. To avoid this execute right after all that mataal said one more command:
git update-index --assume-unchanged <path&filename>