I have a huge git repository and what I would like to clean up some binary files that went into the repository by mistake. Unfortunately those commits were made somewhere in between and are therefore not just deletable. Also the git is currently on a private server stored as bare repository (as backup and central distribution)
So technically I'm looking for a automated tool that recreates a complete git with each single commit but ignoring specific files and folders. I would love to preserve the author, each commit message and the commit date (if possible). The manual way would be some sort of creating new repo and create a manual diff between each commit from the old repo. Apply the diff to the new repo and check if there are files that should be excluded and commit....this is very tedious and prone to mistakes.
Of course deleting the files would be the easist way, however I really would shrink the size of the repository (deleting won't do that since each commit is restorable 100%). I could also apply a huge diff from first commit to the current head, but I would preserve the commit messages, the author and hopefully the date to still rely on "git blame". Also I would preserve the full history locally.
I'm aware that everybody needs to reclone the new repository since each commit hash (or commit id) will change. Also would need to destroy the remote repository with the fresh new copy.
Anybody know an automated tool to do that?