From: Guido Ostkamp Date: Thu, 08 May 2008 18:55:50 GMT Subject: Re: git gc & deleted branches Message-ID: In-Reply-To: <20080508183926.GA30613@sigill.intra.peff.net> On Thu, 8 May 2008, Jeff King wrote: > On Thu, May 08, 2008 at 07:45:31PM +0200, Guido Ostkamp wrote: > >> [gc] >> reflogExpire = 0 >> reflogExpireUnreachable = 0 >> rerereresolved = 0 >> rerereunresolved = 0 >> packrefs = 1 > > git-gc uses a "safe" pruning mode, where it only prunes unreferenced > objects that are older than a certain period (this makes it safe to run > git-gc, even if other processes are creating objects at the same time). > > So try > > [gc] > pruneExpire = now > > Alternatively, you can just run 'git prune' manually instead of 'git > gc'. Jeff, I tried it, but it has no effect (see below). There is only the master branch left, and only one commit therein, still it uses the space former occupied by the branch. I'm using git version 1.5.5.1.147.g867f. Any further ideas? $ git config -l core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true gc.reflogexpire=0 gc.reflogexpireunreachable=0 gc.rerereresolved=0 gc.rerereunresolved=0 gc.packrefs=1 gc.pruneexpire=now $ git gc Counting objects: 6, done. Compressing objects: 100% (4/4), done. Writing objects: 100% (6/6), done. Total 6 (delta 0), reused 6 (delta 0) $ git prune $ git branch * master $ du -s . 30820 . $ git log commit 9717437cdcb2a4457f28f41db5f6fad9ca55b54e Author: Testuser Date: Thu May 8 19:40:06 2008 +0200 initial checkin $ ls -l total 10240 -rw-r--r-- 1 testuser users 10485760 May 8 19:40 file Regards Guido