There were a few questions about removing certain files from git history (i.e., Remove a file from a Git repository without deleting it from the local filesystem). However, I can't find a way to remove all the .gitignore'd files from history. The problem is I had a personal local repository and didn't care much about the ignored files, but now I need to share it and it would take forever to upload it to the server because of plenty irrelevant *.csv, *.zip and other files. They are spread between quite a few directories and it would be hard to perform this task one-by-one.
So, is it possible to perform a git rm --cached
on all files with certain extensions?