threads / discuss / 49353

garbage collection following a "git remote rm"?

Subject: garbage collection following a "git remote rm"?

## tl;dr

2 messages between Sep 15, 2018 and Sep 15, 2018.

replies: 1people: 2as markdown or json

Robert P. J. Day· Sep 15, 2018, 14:31 UTC · lore
  i've never checked before, but i assume that if i add a remote, then
fetch from it and subsequently remove that remote, all of the
now-unreferenced remote tracking branches in the object store will
eventually be discarded by garbage collection, yes?
  is there a command (git fsck?) that would display exclusively
objects in the object store corresponding to objects that are suddenly
unreferenced due to the removal of a remote? i was just curious as it
would be neat to demo that in a class.
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Junio C Hamano· Sep 15, 2018, 16:00 UTC · re: Robert P. J. Day · lore

Re: garbage collection following a "git remote rm"?

"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>   is there a command (git fsck?) that would display exclusively
> objects in the object store corresponding to objects that are suddenly
> unreferenced due to the removal of a remote?

fsck gives you dangling ones (and can be told to give you unreachable ones, too) but the list will be more like "these are unreachable, period". It won't be like "these are the ones that recently became unreacable, and I am not listing ones that were unreachable already in N hours ago".

← back to recent threads