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

Re: Any tips for improving the performance of cloning large repositories?

From
SRSeth Robertson <in-gitvger@baka.org>
Date
Dec 16, 2011, 14:14 UTC
Message-ID
<201112161414.pBGEExLJ006769@no.baka.org>
In-Reply-To
<hbf.20111216zcin@bombur.uio.no>
In message <hbf.20111216zcin@bombur.uio.no>, Hallvard Breien Furuseth writes:
    I wrote:
    > Do you often need to clone from a remote?  Instead of cloning from a
    > local (git clone --mirror) which gets auto-updated from the remote.
    Er, obviously not, since you tried that with rsync.  Create the mirror
    with 'git clone --mirror', then update it with 'git fetch' rather than
    rsync.

If you really need to perform a full clone from the buildbot with or without a different working directory (for instance if you have buildbots/checkout users running in parallel where multiple users need a consistent HEAD for multiple sequential operations) then instead consider cloning with --reference or --shared. There are severe restrictions on what you should do with aggressive sharing (man git-clone), but if all you are doing is normal checkouts, tags, commits, etc, then it would be just fine. Of course remember to add a remote for the real upstream if you are planning on pushing changes/tags back.

					-Seth Robertson
Previous: Hallvard Breien FurusethNext: Alex Bennee
Message 4 of 7 in “Any tips for improving the performance of cloning large repositories?”
  1. Alex BenneeDec 16, 2011
  2. Hallvard Breien FurusethDec 16, 2011
  3. Hallvard Breien FurusethDec 16, 2011
  4. Seth RobertsonDec 16, 2011
  5. Alex BenneeDec 16, 2011
  6. Junio C HamanoDec 16, 2011
  7. Alex BenneeDec 16, 2011

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.