gitignore

You can also remove files from the repository based on your .gitignore without deleting them from the local file system :

git rm --cached `git ls-files -i -X .gitignore`
Or, alternatively, on Windows Powershell:

git rm --cached $(git ls-files -i -X .gitignore)

Taggings:

Subscribe to gitignore