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

Re: How to safely remove a blob

From
Alex Riesen <raa.lkml@gmail.com>
Date
Feb 15, 2011, 08:40 UTC
Message-ID
<AANLkTinrV3hKEva5qnaLniP+VoO2trrTVsWcc6YoBQ=t@mail.gmail.com>
In-Reply-To
<4D5A358F.2050906@ilt.fraunhofer.de>

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.
Previous: Rolf WesterNext: Alex Riesen
Message 2 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.