{"thread":{"id":"17808","subject":"Possible git bug when using filter-branch to remove large binaries","startedAt":"2009-02-15T21:35:14Z","lastAt":"2009-02-15T21:55:01Z","messageCount":2,"participants":["Juan Zanos","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"104827","messageId":"34854909-55F5-4869-A7A6-0E179F2F7A44@talkhouse.com","threadId":"17808","inReplyTo":null,"subject":"Possible git bug when using filter-branch to remove large binaries","fromName":"Juan Zanos","fromEmail":"juan_zanos@talkhouse.com","sentAt":"2009-02-15T21:35:14Z","receivedAt":"2009-02-15T21:35:14Z","isPatch":false,"sender":{"key":"juan_zanos@talkhouse.com","avatar":null},"body":"Hi Vger,\n\nI'm trying to remove a directory of large binaries from a git  \nrepository    There is a directory of 85M in a git repository of  \n92M.  So the binaries are relatively massive and should never have  \nbeen checked in in the first place.  I've tried to use filter-branch  \nto permanently remove those binaries.  The directory successfully  \nvanishes. However, the repository + working directory only goes from  \n216M down to 133M.   That means the binaries were only removed from  \nthe working directory.   The repository remains bloated.   I've tried  \na handful of magic incantations using commands such as gc, prune,  \nreflog expire --all, etc..  None of these have  worked.   In fact,  \nafter cloning the 133M (repo + working) and running gc the directory  \nactually increased in size from 133M to 290M!\n\nI'm not really sure I understand what's  going on here.   It  sounds  \nlike the growth to 290M  is a  bug.  If so I'm  happy to provide the  \nrepo as a test case as well as the exact commands I use.  On the  \nother hand, I'm finding that the git API is  complex enough that I   \ncould easily be doing something wrong or missing some command.   In  \nthat case is there a simple set of commands I could use to remove a  \ndirectory of really large binaries that never should  have been  \nchecked in in the first place and reclaim the space ?  I've checked  \npretty thoroughly on Google to find people who have successfully done  \nthis, but it seems mostly people have failed to actually reclaim space.\n\nCheers,\nJuan\n"},{"id":"104830","messageId":"200902152255.05655.trast@student.ethz.ch","threadId":"17808","inReplyTo":"34854909-55F5-4869-A7A6-0E179F2F7A44@talkhouse.com","subject":"Re: Possible git bug when using filter-branch to remove large binaries","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-15T21:55:01Z","receivedAt":"2009-02-15T21:55:01Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Juan Zanos wrote:\n> I'm trying to remove a directory of large binaries from a git  \n> repository\n[...]\n> The directory successfully  \n> vanishes. However, the repository + working directory only goes from  \n> 216M down to 133M.   That means the binaries were only removed from  \n> the working directory.\n\nWe're in fact trying to make a generic recipe and put it in 'man\ngit-filter-branch'.  The preliminary patch is here:\n\n  http://article.gmane.org/gmane.comp.version-control.git/109925/\n\nOnce you convince your eyes to ignore the leading +, it should be\nfairly easy to read in patch form. ;-)\n\nIt would be very helpful if you could try the recipe, and report if it\nworked.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}