Re: Question on git-filter-branch
Mike Hommey, Thu, Nov 01, 2007 14:34:41 +0100:
Show 14 quoted lines
> On Thu, Nov 01, 2007 at 07:19:05AM -0600, Bill Lear wrote:
> > >Just remove .git/refs/original/
> >
> > Ok, thanks. But, how do I remove the subdirectory?
> >
> > % rm -rf .git/refs/original
> > % git filter-branch --index-filter 'git update-index --remove sensitive_stuff' HEAD
> > Rewrite 6711f6a50605918326f67ca0c3402eab9a4c8571 (8/8)
> > WARNING: Ref 'refs/heads/master' is unchanged
>
> git-update-index --remove will remove files, not trees, so you need to
> use something like
> git-ls-files ensitive_stuff | xargs -d "\n" git-update-index --remove
> instead.
git ls-files -z sensitive_stuff | git update-index --remove -z --stdin