From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Git Mailing list <git@vger.kernel.org>
Subject: how can i "gc" or "prune" objects related to a deleted remote?
Date: Fri, 8 Mar 2019 10:36:44 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.21.1903081029510.25426@localhost.localdomain> (raw)
writing a short tutorial on how to add a remote and work with it
and, as a final step, show how, if one is uninterested in the remote
after all, one can simply delete it, but i also want to show how one
can then prune or garbage collect the objects related to that remote,
but i can't figure out how.
as an example, i cloned the linux kernel source tree, then added
the linux-next repo as a remote -- the end result was two pack files
(the smaller one i'm assuming being for linux-next):
$ ls -l .git/objects/pack
total 2723632
-r--r--r--. 1 rpjday rpjday 1215376 Mar 8 09:44 pack-08cc266c0914e924961a1c8412fdf8746d327d7e.idx
-r--r--r--. 1 rpjday rpjday 38402840 Mar 8 09:44 pack-08cc266c0914e924961a1c8412fdf8746d327d7e.pack
-r--r--r--. 1 rpjday rpjday 204032716 Mar 8 09:42 pack-1036510bb74967c91093fc0cd8982683a66dbf5f.idx
-r--r--r--. 1 rpjday rpjday 2545333327 Mar 8 09:42 pack-1036510bb74967c91093fc0cd8982683a66dbf5f.pac
$
after playing with a couple branches from the new remote, i deleted
the remote, then also did things like clear the reflog, delete any
local tracking branches related to the deleted remote, and so on, but
i can't seem to prune the objects that should no longer be reachable
now that i deleted that remote.
what am i overlooking? is it because those objects are in a separate
pack file? do i need to repack first? what is hanging onto those
objects in that second pack file such that they can't be garbage
collected?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca/dokuwiki
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
next reply other threads:[~2019-03-08 15:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 15:36 Robert P. J. Day [this message]
2019-03-19 6:39 ` how can i "gc" or "prune" objects related to a deleted remote? Jeff King
2019-03-19 9:35 ` Ævar Arnfjörð Bjarmason
2019-03-20 5:22 ` Jeff King
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=alpine.LFD.2.21.1903081029510.25426@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=git@vger.kernel.org \
/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).