I have a private repository which has never been published. My current .gitignore excludes many junk files which I previously forgot to exclude, and I would like these junk files to disappear from my git history. https://stackoverflow.com/a/8112372/2024042 explains how to remove a single file bin from the git history, but can I apply the entire rules of .gitignore to all commits in the past, without manually enumerating each individual file?
See also Completely remove file from all Git repository commit history for removing individual files.