Re: Question on git-filter-branch
On Thu, Nov 01, 2007 at 06:55:37AM -0600, Bill Lear wrote:
Show 26 quoted lines
> In my repo, I have sensitive files A, C, and a directory full of
> sensitive stuff I want to remove forever from the git repository.
>
> % ls
> A B C D sensitive_stuff
>
> % git --version
> git version 1.5.3.5
>
> % git filter-branch --index-filter 'git update-index --remove A' HEAD
> Rewrite 5dd7d5f2d7d3a5f43c242188ac96294628267673 (7/7)
> Ref 'refs/heads/master' was rewritten
>
> These refs were rewritten:
> % ls
> B C D sensitive_stuff
>
> % git status
> # On branch master
> nothing to commit (working directory clean)
>
> Ok, so I guess it has done what I wanted. So, I try to remove the
> next file that has sensitive information in it:
>
> % git filter-branch --index-filter 'git update-index --remove C' HEAD
> Namespace refs/original/ not empty
Just remove .git/refs/original/
Mike