git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: Question on git-filter-branch
Date: Thu, 1 Nov 2007 13:58:45 +0100	[thread overview]
Message-ID: <20071101125845.GA27567@glandium.org> (raw)
In-Reply-To: <18217.52425.655322.52338@lisa.zopyra.com>

On Thu, Nov 01, 2007 at 06:55:37AM -0600, Bill Lear wrote:
> 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

  reply	other threads:[~2007-11-01 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 12:55 Question on git-filter-branch Bill Lear
2007-11-01 12:58 ` Mike Hommey [this message]
2007-11-01 13:19   ` Bill Lear
2007-11-01 13:34     ` Mike Hommey
2007-11-01 13:54       ` Bill Lear
2007-11-01 14:20       ` Alex Riesen
  -- strict thread matches above, loose matches on Subject: below --
2007-10-17  0:57 Bill Lear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071101125845.GA27567@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    --cc=rael@zopyra.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).