{"thread":{"id":"26506","subject":"How to safely remove a blob","startedAt":"2011-02-15T08:13:03Z","lastAt":"2011-02-15T08:42:03Z","messageCount":4,"participants":["Rolf Wester","Alex Riesen","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"161159","messageId":"4D5A358F.2050906@ilt.fraunhofer.de","threadId":"26506","inReplyTo":null,"subject":"How to safely remove a blob","fromName":"Rolf Wester","fromEmail":"rolf.wester@ilt.fraunhofer.de","sentAt":"2011-02-15T08:13:03Z","receivedAt":"2011-02-15T08:13:03Z","isPatch":false,"sender":{"key":"rolf.wester@ilt.fraunhofer.de","avatar":null},"body":"Hello,\n\nin one of my git repos I found an 102 MB object that probably came in there more or less occasionally.\nIts a blob and I would like to remove it safely. I tried to figure out how to do it but I was\nnot very successful. I guess simply deleting the file could corrupt my repo or at least the clones of\nthat repo.\n\nI would be very appreciative for any help.\n\nWith kind regards\nRolf\n\n-- \n------------------------------------\n# Dr. Rolf Wester\n# Fraunhofer Institut f. Lasertechnik\n# Steinbachstrasse 15, D-52074 Aachen, Germany.\n# Tel: + 49 (0) 241 8906 401, Fax: +49 (0) 241 8906 121\n# EMail: rolf.wester@ilt.fraunhofer.de\n# WWW:   http://www.ilt.fraunhofer.de\n"},{"id":"161161","messageId":"AANLkTinrV3hKEva5qnaLniP+VoO2trrTVsWcc6YoBQ=t@mail.gmail.com","threadId":"26506","inReplyTo":"4D5A358F.2050906@ilt.fraunhofer.de","subject":"Re: How to safely remove a blob","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2011-02-15T08:40:46Z","receivedAt":"2011-02-15T08:40:46Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Feb 15, 2011 at 09:13, Rolf Wester\n<rolf.wester@ilt.fraunhofer.de> wrote:\n> in one of my git repos I found an 102 MB object that probably came in there\n> more or less occasionally.\n> Its a blob and I would like to remove it safely. I tried to figure out how\n> to do it but I was not very successful.\n\nTake a look at \"git filter-branch\". There is even an example which\ndoes exactly this (search for \"git filter-branch --tree-filter\").\n\n> I guess simply deleting the file could corrupt my repo\n> or at least the clones of that repo.\n\nThe repo itself.\n"},{"id":"161163","messageId":"4D5A3C1B.2030600@drmicha.warpmail.net","threadId":"26506","inReplyTo":"4D5A358F.2050906@ilt.fraunhofer.de","subject":"Re: How to safely remove a blob","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-02-15T08:40:59Z","receivedAt":"2011-02-15T08:40:59Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Rolf Wester venit, vidit, dixit 15.02.2011 09:13:\n> Hello,\n> \n> in one of my git repos I found an 102 MB object that probably came in there more or less occasionally.\n> Its a blob and I would like to remove it safely. I tried to figure out how to do it but I was\n> not very successful. I guess simply deleting the file could corrupt my repo or at least the clones of\n> that repo.\n> \n> I would be very appreciative for any help.\n\nIf nothing references that blob then it will go away eventually. The\nlast section of git-filter-branch's manpage (checklist for shrinking a\nrepo) details the steps you can take to get rid of it now. (You should\nbe already in the situation after applying filter-branch and removing\nrefs/original/*.) If the blob still persists then it is referenced.\n\nMichael\n"},{"id":"161162","messageId":"AANLkTi=N15_2aDbw=x_m6rPWYdgwcBkn0LvmtZVt2W48@mail.gmail.com","threadId":"26506","inReplyTo":"AANLkTinrV3hKEva5qnaLniP+VoO2trrTVsWcc6YoBQ=t@mail.gmail.com","subject":"Re: How to safely remove a blob","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2011-02-15T08:42:03Z","receivedAt":"2011-02-15T08:42:03Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Feb 15, 2011 at 09:40, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On Tue, Feb 15, 2011 at 09:13, Rolf Wester\n> <rolf.wester@ilt.fraunhofer.de> wrote:\n>> in one of my git repos I found an 102 MB object that probably came in there\n>> more or less occasionally.\n>> Its a blob and I would like to remove it safely. I tried to figure out how\n>> to do it but I was not very successful.\n>\n> Take a look at \"git filter-branch\". There is even an example which\n> does exactly this (search for \"git filter-branch --tree-filter\").\n\n... search in the manpage of filter-branch. Sorry.\n"}]}