git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: reducing object store size with remote alternates or shallow clone?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2010, 16:45 UTC
Message-ID
<7vhbikx8lu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<14526ED4-F65C-4DF2-ABDD-BF1E76DAC2B0@kernel.crashing.org>
Kumar Gala <galak@kernel.crashing.org> writes:
Show 9 quoted lines
> I'm trying to package a linux kernel source tree and would like to just
> tar up a tree with .git/.  However this is a bit problematic as the size
> of tgz is about 500M which exceeds the limit of the image I'm trying to
> produce.
>
> I was wondering if anyone had a means to reduce the size drastically.
> I'm ok if a post processing step is required to get full git support.
> One idea I had was doing a shallow clone and if there was some means to
> "reconnect" it to a full work state after the fact.

Although your message body does not state your design constraints clearly, your subject line hints that you are fine with a solution that involves use of remote alternates by the recipient of your tarball.

I am _guessing_ that you have a fork from some well known tree and want to sneakernet it to your recipients (iow, they do not "git pull" from your repository).

How about doing
    $ LINUS=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    $ git fetch $LINUS
    $ git bundle create myfork.bundle HEAD..master
and sending the thing over?  The recipient would then do something like:
    $ LINUS=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    $ git clone $LINUS linux
    $ cd linux
    $ git pull /tmp/myfork.bundle master
Previous: Kumar GalaNext: Brandon Casey
Message 2 of 13 in “reducing object store size with remote alternates or shallow clone?”
  1. Kumar GalaAug 24, 2010
  2. Junio C HamanoAug 24, 2010
  3. Brandon CaseyAug 24, 2010
  4. Junio C HamanoAug 24, 2010
  5. Brandon CaseyAug 24, 2010
  6. 1/2 t/t5510: demonstrate failure to fetch when current branch has merge refBrandon Casey, Aug 25, 2010
  7. Junio C HamanoAug 25, 2010
  8. 2/2 builtin/fetch.c: ignore merge config when not fetching from branch's remoteBrandon Casey, Aug 25, 2010
  9. Jonathan NiederAug 25, 2010
  10. Brandon CaseyAug 25, 2010
  11. Junio C HamanoAug 25, 2010
  12. 1/2 builtin/fetch.c: comment that branch->remote_name is usable when has_mergeBrandon Casey, Sep 9, 2010
  13. 2/2 t/t5510-fetch.sh: improve testing with explicit URL and merge specBrandon Casey, Sep 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.