Subject: Re: remove all traces of some files

From: Phil Hord <[email-masked]>
Date: Wed, 27 Apr 2011 16:40:22 -0400

On 04/27/2011 03:58 PM, Eric Frederich wrote:
> I have been adding build files (.dll and .so files) to my git
> repository periodically when I have been doing builds of my project.
> I know I shouldn't be doing this and want to set up some other kind of
> separate archive or something for built files.
>
> Although there are other devs on the project, I am the only one using
> Git.  Everyone else uses AccuRev.
> Personally, I maintain my own Git repo (with an AccuRev git branch).
>
> I would like to remove all traces of those .dll and .so files if I
> could in my git repository.
> I realize this would mess with hashes and would ultimately result in a
> completely new tree.
> I am fine with that since, as I said, I am the only user of this Git repo.
>
> So, can this be done?  Can I rebuild the tree preserving commit
> messages, timestamps, etc but ignoring certain files?

Something like this, perhaps:
  git filter-branch --index-filter "git rm --cached --ignore-unmatch
--quiet '*.dll' '*.so' " -- --all

More examples here:
  git filter-branch --help

Phil