Git development
 help / color / mirror / Atom feed
* How to safely remove a blob
@ 2011-02-15  8:13 Rolf Wester
  2011-02-15  8:40 ` Alex Riesen
  2011-02-15  8:40 ` Michael J Gruber
  0 siblings, 2 replies; 4+ messages in thread
From: Rolf Wester @ 2011-02-15  8:13 UTC (permalink / raw)
  To: git

Hello,

in one of my git repos I found an 102 MB object that probably came in there more or less occasionally.
Its a blob and I would like to remove it safely. I tried to figure out how to do it but I was
not very successful. I guess simply deleting the file could corrupt my repo or at least the clones of
that repo.

I would be very appreciative for any help.

With kind regards
Rolf

-- 
------------------------------------
# Dr. Rolf Wester
# Fraunhofer Institut f. Lasertechnik
# Steinbachstrasse 15, D-52074 Aachen, Germany.
# Tel: + 49 (0) 241 8906 401, Fax: +49 (0) 241 8906 121
# EMail: rolf.wester@ilt.fraunhofer.de
# WWW:   http://www.ilt.fraunhofer.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to safely remove a blob
  2011-02-15  8:13 How to safely remove a blob Rolf Wester
@ 2011-02-15  8:40 ` Alex Riesen
  2011-02-15  8:42   ` Alex Riesen
  2011-02-15  8:40 ` Michael J Gruber
  1 sibling, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2011-02-15  8:40 UTC (permalink / raw)
  To: Rolf Wester; +Cc: git

On Tue, Feb 15, 2011 at 09:13, Rolf Wester
<rolf.wester@ilt.fraunhofer.de> wrote:
> in one of my git repos I found an 102 MB object that probably came in there
> more or less occasionally.
> Its a blob and I would like to remove it safely. I tried to figure out how
> to do it but I was not very successful.

Take a look at "git filter-branch". There is even an example which
does exactly this (search for "git filter-branch --tree-filter").

> I guess simply deleting the file could corrupt my repo
> or at least the clones of that repo.

The repo itself.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to safely remove a blob
  2011-02-15  8:13 How to safely remove a blob Rolf Wester
  2011-02-15  8:40 ` Alex Riesen
@ 2011-02-15  8:40 ` Michael J Gruber
  1 sibling, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2011-02-15  8:40 UTC (permalink / raw)
  To: Rolf Wester; +Cc: git

Rolf Wester venit, vidit, dixit 15.02.2011 09:13:
> Hello,
> 
> in one of my git repos I found an 102 MB object that probably came in there more or less occasionally.
> Its a blob and I would like to remove it safely. I tried to figure out how to do it but I was
> not very successful. I guess simply deleting the file could corrupt my repo or at least the clones of
> that repo.
> 
> I would be very appreciative for any help.

If nothing references that blob then it will go away eventually. The
last section of git-filter-branch's manpage (checklist for shrinking a
repo) details the steps you can take to get rid of it now. (You should
be already in the situation after applying filter-branch and removing
refs/original/*.) If the blob still persists then it is referenced.

Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to safely remove a blob
  2011-02-15  8:40 ` Alex Riesen
@ 2011-02-15  8:42   ` Alex Riesen
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Riesen @ 2011-02-15  8:42 UTC (permalink / raw)
  To: Rolf Wester; +Cc: git

On Tue, Feb 15, 2011 at 09:40, Alex Riesen <raa.lkml@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 09:13, Rolf Wester
> <rolf.wester@ilt.fraunhofer.de> wrote:
>> in one of my git repos I found an 102 MB object that probably came in there
>> more or less occasionally.
>> Its a blob and I would like to remove it safely. I tried to figure out how
>> to do it but I was not very successful.
>
> Take a look at "git filter-branch". There is even an example which
> does exactly this (search for "git filter-branch --tree-filter").

... search in the manpage of filter-branch. Sorry.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-15  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15  8:13 How to safely remove a blob Rolf Wester
2011-02-15  8:40 ` Alex Riesen
2011-02-15  8:42   ` Alex Riesen
2011-02-15  8:40 ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox