git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>,
	Git Mailing list <git@vger.kernel.org>
Subject: Re: how can i "gc" or "prune" objects related to a deleted remote?
Date: Wed, 20 Mar 2019 01:22:26 -0400	[thread overview]
Message-ID: <20190320052226.GA9650@sigill.intra.peff.net> (raw)
In-Reply-To: <878sxbdx51.fsf@evledraar.gmail.com>

On Tue, Mar 19, 2019 at 10:35:54AM +0100, Ævar Arnfjörð Bjarmason wrote:

> > 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

      reply	other threads:[~2019-03-20  5:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 15:36 how can i "gc" or "prune" objects related to a deleted remote? Robert P. J. Day
2019-03-19  6:39 ` Jeff King
2019-03-19  9:35   ` Ævar Arnfjörð Bjarmason
2019-03-20  5:22     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320052226.GA9650@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).