is there a way to parse a .gitignore and tell me if i already have some files that match the ignores so that i know to remove them or change my .gitignore?
example is that i have git tracking my imgs directory, and i wish to ignore all of windows Thumbs.db, and also tell me if I have any left over in my repository being tracked so that i can remove them.
Try
git ls-files --ignored. You might have to play with the options, butls-filesis the right starting point for writing a script that matches files using the excludes patterns.