All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Lear <rael@zopyra.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: Question on git-filter-branch
Date: Thu, 1 Nov 2007 07:54:56 -0600	[thread overview]
Message-ID: <18217.55984.327062.84306@lisa.zopyra.com> (raw)
In-Reply-To: <20071101133440.GA17239@glandium.org>

On Thursday, November 1, 2007 at 14:34:41 (+0100) Mike Hommey writes:
>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.

Oh yeah, now we're cookin' with gas:

% git filter-branch --index-filter 'git-ls-files sensitive_stuff | xargs -d "\n" git-update-index --remove' HEAD
Rewrite 6711f6a50605918326f67ca0c3402eab9a4c8571 (8/8)
Ref 'refs/heads/master' was rewritten

These refs were rewritten:
blake^master ~*/sensitive.clone ls
B  D

Excellent.

Thanks for the help.


Bill

  reply	other threads:[~2007-11-01 13:55 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
2007-11-01 13:19   ` Bill Lear
2007-11-01 13:34     ` Mike Hommey
2007-11-01 13:54       ` Bill Lear [this message]
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=18217.55984.327062.84306@lisa.zopyra.com \
    --to=rael@zopyra.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.