{"thread":{"id":"12068","subject":"Can a git repository be initialized with a bundle?","startedAt":"2008-02-13T08:21:42Z","lastAt":"2008-02-13T09:02:15Z","messageCount":2,"participants":["Tom Koelman","Santi Béjar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"68611","messageId":"m3abm56zc9.fsf@assurancetourix.xs4all.nl","threadId":"12068","inReplyTo":null,"subject":"Can a git repository be initialized with a bundle?","fromName":"Tom Koelman","fromEmail":"tkoelman@xs4all.nl","sentAt":"2008-02-13T08:21:42Z","receivedAt":"2008-02-13T08:21:42Z","isPatch":false,"sender":{"key":"tkoelman@xs4all.nl","avatar":null},"body":"\nHi,\n\nI got some repository from which I created a bundle like so:\n\n$ git bundle create all.bundle --all\n\nNow I want to recreate this repository somewhere else:\n\n$ mkdir tmp ; cd tmp ; git init\nInitialized empty Git repository in .git/\n$ git fetch all.bundle\nfatal: Couldn't find remote ref HEAD\n\nIt doesn't matter whether I try to fetch, pull, or add -f to the command\nline, I always get this response.\n\nAm I trying to accomplish something that can't be done or am I doing it\nwrong?\n\nI am running git version 1.5.4.1 under Linux.\n\nRegards,\nTom Koelman\n"},{"id":"68615","messageId":"8aa486160802130102k42158154t7c81b37171a29243@mail.gmail.com","threadId":"12068","inReplyTo":"m3abm56zc9.fsf@assurancetourix.xs4all.nl","subject":"Re: Can a git repository be initialized with a bundle?","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2008-02-13T09:02:15Z","receivedAt":"2008-02-13T09:02:15Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Feb 13, 2008 9:21 AM, Tom Koelman <tkoelman@xs4all.nl> wrote:\n>\n> Hi,\n>\n> I got some repository from which I created a bundle like so:\n>\n> $ git bundle create all.bundle --all\n\n--all does not imply HEAD, so:\n\n$ git bundle create all.bundle --all HEAD\n\n> Now I want to recreate this repository somewhere else:\n>\n> $ mkdir tmp ; cd tmp ; git init\n> Initialized empty Git repository in .git/\n> $ git fetch all.bundle\n> fatal: Couldn't find remote ref HEAD\n\nyou have to say explicitly the branches you want as:\n\n$ git fetch all.bundle master:bundle/master\n\nor with a remote:\n\n$ git remote add bundle all.bundle\n$ git fetch bundle\n\n>\n> It doesn't matter whether I try to fetch, pull, or add -f to the command\n> line, I always get this response.\n\nThe same happens with a normal remote repository without a HEAD.\n\n>\n> Am I trying to accomplish something that can't be done or am I doing it\n> wrong?\n\nI sent a path to support bundles in clone, but it was late for 1.5.4\nand at some point \"git clone\" will be converted to C (now it is a\nscript). For now you have to do the \"git init ; git remote add -f\n...\", or similar.\n\nSanti\n"}]}