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

Re: Can a git repository be initialized with a bundle?

From
SBSanti Béjar <sbejar@gmail.com>
Date
Feb 13, 2008, 09:02 UTC
Message-ID
<8aa486160802130102k42158154t7c81b37171a29243@mail.gmail.com>
In-Reply-To
<m3abm56zc9.fsf@assurancetourix.xs4all.nl>
On Feb 13, 2008 9:21 AM, Tom Koelman <tkoelman@xs4all.nl> wrote:
Show 6 quoted lines
>
> Hi,
>
> I got some repository from which I created a bundle like so:
>
> $ git bundle create all.bundle --all
--all does not imply HEAD, so:
$ git bundle create all.bundle --all HEAD
Show 6 quoted lines
> Now I want to recreate this repository somewhere else:
>
> $ mkdir tmp ; cd tmp ; git init
> Initialized empty Git repository in .git/
> $ git fetch all.bundle
> fatal: Couldn't find remote ref HEAD
you have to say explicitly the branches you want as:
$ git fetch all.bundle master:bundle/master
or with a remote:

$ git remote add bundle all.bundle $ git fetch bundle

>
> It doesn't matter whether I try to fetch, pull, or add -f to the command
> line, I always get this response.
The same happens with a normal remote repository without a HEAD.
>
> Am I trying to accomplish something that can't be done or am I doing it
> wrong?

I sent a path to support bundles in clone, but it was late for 1.5.4 and at some point "git clone" will be converted to C (now it is a script). For now you have to do the "git init ; git remote add -f ...", or similar.

Santi
Previous: Tom Koelman
Message 2 of 2 in “Can a git repository be initialized with a bundle?”
  1. Tom KoelmanFeb 13, 2008
  2. Santi BéjarFeb 13, 2008

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.