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

RE: [BUG] git clone from bundle with --all does not fetch all refs

From
AHAndrew Harmon <aharmon@signalquest.com>
Date
Oct 8, 2025, 19:19 UTC
Message-ID
<BN0PR13MB5216F02F4FD2C3F0FC0EA770BBE1A@BN0PR13MB5216.namprd13.prod.outlook.com>
In-Reply-To
<87ldllw7jk.fsf@igel.home>
> If you want that equivalency, then you need to create the bundle either
> directly from <ssh-or-https-target>, or a mirror clone thereof.  By using a
> regular clone as the source for the bundle you already have a different type
> of repository than the one you see at the <ssh-or-https-target>.
Thank you! This explanation really helps. Creating the bundle from a mirrored clone of the ssh target is exactly what I needed. This could be clearer in the docs. Several hours of time with Google, Claude, and ChatGPT all failed to point me at this simple (and now obvious) explanation.
I appreciate your help, and your dedication to the Git project.

Kind regards, Andrew

-----Original Message-----
From: Andreas Schwab <schwab@linux-m68k.org> 
Sent: Wednesday, October 8, 2025 14:52
To: Andrew Harmon <aharmon@signalquest.com>
Cc: Junio C Hamano <gitster@pobox.com>; git@vger.kernel.org
Subject: Re: [BUG] git clone from bundle with --all does not fetch all refs
On Okt 08 2025, Andrew Harmon wrote:
> As an end user, I found this very surprising. I was expecting to call:
> git clone <repo-bundle>
> and have this behave just like:
> git clone <ssh-or-https-target>
If you want that equivalency, then you need to create the bundle either directly from <ssh-or-https-target>, or a mirror clone thereof.  By using a regular clone as the source for the bundle you already have a different type of repository than the one you see at the <ssh-or-https-target>.
Show 7 quoted lines
> echo ""
> echo "Clone the repo via SSH"
> git clone git@UBUBEAR:external_sources/matrice_sq.git matrice_sq
>
> echo ""
> echo "View available remote branches"
> (cd matrice_sq && git branch -r)

Compare the output of "git ls-remote matrice_sq" with the output of "git ls-remote git@UBUBEAR:external_sources/matrice_sq.git" to see the difference between the two repositories.

>
> echo ""
> echo "Pack the bundle for offline distribution"
> (cd matrice_sq && git bundle create ../matrice_sq.bundle --all)
The bundle picks up the refs from your local clone matice_sq, which is different from the list of refs you'll see in the external source.

-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Previous: Andreas Schwab
Message 7 of 7 in “[BUG] git clone from bundle with --all does not fetch all refs”
  1. Andrew HarmonOct 7, 2025
  2. Junio C HamanoOct 7, 2025
  3. Andrew HarmonOct 7, 2025
  4. Junio C HamanoOct 8, 2025
  5. Andrew HarmonOct 8, 2025
  6. Andreas SchwabOct 8, 2025
  7. Andrew HarmonOct 8, 2025

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.