git remove files matching gitignore code example
Example 1: git remove all files from gitignore
git ls-files -i --exclude-from=.gitignore | %{git rm --cached $_}
// works with windows powershell
Example 2: remove gitignore files
git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"
// answer from: thSoft