git rm --cached `git ls-files -i -c --exclude-from=.gitignore`
git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"
// answer from: thSoft
git rm -r --cached .
git add .
git commit -am "Drop ignored files"