Re: Question on git-filter-branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux