git rm --cached [filenames]
Here’s how I removed all the files I wanted to delete from one of my bin subdirectories:
git rm --cached bin/com/devdaily/sarah/\*
I use the unusual * syntax at the end of that command instead of * because you need to escape the * from the git command. In a simpler example, if there was just one file in the bin directory named Foo.class that I wanted to remove from the Git repository, I would use this command: