From: Johannes Schindelin Date: Mon, 08 Oct 2007 00:34:07 GMT Subject: Re: Trying to use git-filter-branch to compress history by removing large, obsolete binary files Message-ID: In-Reply-To: <51419b2c0710071638p6dcc0c7cm2a813c22758e6f32@mail.gmail.com> Hi, On Sun, 7 Oct 2007, Elijah Newren wrote: > On 10/7/07, Johannes Schindelin wrote: > > On Sun, 7 Oct 2007, Elijah Newren wrote: > > > > $ git clone test test2 > > > > > > $ du -hs test > > > 11M test > > > $ du -hs test2 > > > 11M test2 > > > > > > Any other ideas? > > > > Yep. Maybe it is necessary to run "git gc" in test2. > > Sweet, finally solved! That brings test2 down to 340K. > > However, the solution seems somewhat involved...it requires running > git-filter-branch, git reset, removing the .git/refs/original/ > directory, editing .git/packed-refs in some editor, running git reflog > expire, cloning the resulting repository, and running git gc yet again. > It seems like there has to be an easier way. (Anyone have one?) It should be as easy as git filter-branch and git clone. > Oh, and git-filter-branch could really use some explanatory note about > how to actually complete rewriting the history. It does what it should do. It is _your_ task to look at refs/original/* if everything went alright. Then you just delete the checked refs. What made your case so cumbersome was that you wanted the big objects out _now_, instead of having them in for a grace period. BTW this grace period is in place to help _you_, not the program. (In case you fscked up and need those objects back.) Ciao, Dscho