git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to safely remove a blob

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 15, 2011, 08:40 UTC
Message-ID
<4D5A3C1B.2030600@drmicha.warpmail.net>
In-Reply-To
<4D5A358F.2050906@ilt.fraunhofer.de>
Rolf Wester venit, vidit, dixit 15.02.2011 09:13:
Show 8 quoted lines
> 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
Previous: Alex Riesen
Message 4 of 4 in “How to safely remove a blob”
  1. Rolf WesterFeb 15, 2011
  2. Alex RiesenFeb 15, 2011
  3. Alex RiesenFeb 15, 2011
  4. Michael J GruberFeb 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.