Re: how can i "gc" or "prune" objects related to a deleted remote?
On Tue, Mar 19, 2019 at 10:35:54AM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> > My guess is you forgot the tag? There's not a general solution there,
> > because the tags all get intermingled. Git has no idea which ones came
> > from which remote. However, if you have the commit id of an object you
> > expect to be going away, you can use:
> >
> > git for-each-ref --contains=$that_commit
>
> Not a general solution, but if you know you have one remote left, and
> you don't have unpushed locally created tags, you can do a:
>
> git fetch origin --prune --prune-tags
Good call. I forgot that we even had --prune-tags.
-Peff