Thread (25 messages) 25 messages, 6 authors, 2016-06-15

Re: git gc & deleted branches

flat view

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:35

Guido Ostkamp wrote:
On Thu, 8 May 2008, Jeff King wrote:
quoted
On Thu, May 08, 2008 at 07:45:31PM +0200, Guido Ostkamp wrote:
quoted
[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?

Possibly that object got packed? git-prune only removes loose objects.
Try 'git gc --prune' which will call git-repack with the -a option.

btw, this is _really_ a non-issue. It seems to keep coming up on the list.

Just know that each one of the config options that you set to zero, including
the one Jeff suggested setting to "now", is a safety mechanism that is there
to ensure that you never ever lose data and that mistakes are recoverable.

And be assured that the objects referenced by a deleted branch will be removed
from the repository eventually as long as 'git gc --prune' is run periodically.

-brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help