{"thread":{"id":"12105","subject":"git clone through http bug?","startedAt":"2008-02-14T17:27:22Z","lastAt":"2008-02-14T18:28:14Z","messageCount":3,"participants":["Sergei Organov","David Symonds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"68753","messageId":"873arvv479.fsf@osv.gnss.ru","threadId":"12105","inReplyTo":null,"subject":"git clone through http bug?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2008-02-14T17:27:22Z","receivedAt":"2008-02-14T17:27:22Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Hello,\n\nI've just cloned the public repo (it's rather small):\n\n$ git clone http://ydirson.free.fr/soft/git/cvsps.git\n\nand it has created cvsps/.git, but no working copy. When I examine the\ncontents, I also notice that while the file .git/HEAD has:\n\nref: refs/heads/master\n\nthere is no .git/refs/heads/master file (the directory .git/refs/heads\nis empty).\n\nNow, if I first clone the original repository as --bare, and then make a\nusual local clone from it, the local clone looks file:\n\n$ git clone --bare http://ydirson.free.fr/soft/git/cvsps.git\n$ git clone cvsps.git cvsps.cloned\n\nIs it a problem with clone over http, a problem with the repository, or\nit's me who does something wrong?\n\n-- Sergei.\n"},{"id":"68755","messageId":"ee77f5c20802140936y28be9b39i59753af66e1a5e36@mail.gmail.com","threadId":"12105","inReplyTo":"873arvv479.fsf@osv.gnss.ru","subject":"Re: git clone through http bug?","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-02-14T17:36:22Z","receivedAt":"2008-02-14T17:36:22Z","isPatch":false,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On Thu, Feb 14, 2008 at 9:27 AM, Sergei Organov <osv@javad.com> wrote:\n> Hello,\n>\n>  I've just cloned the public repo (it's rather small):\n>\n>  $ git clone http://ydirson.free.fr/soft/git/cvsps.git\n>\n>  and it has created cvsps/.git, but no working copy.\n\nThat's because the remote side doesn't have a HEAD. Just run \"git\ncheckout --track -b master origin/master\" to create a local branch the\ntracks the origin/master branch.\n\n\nDave.\n"},{"id":"68760","messageId":"87r6fftmtd.fsf@osv.gnss.ru","threadId":"12105","inReplyTo":"ee77f5c20802140936y28be9b39i59753af66e1a5e36@mail.gmail.com","subject":"Re: git clone through http bug?","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2008-02-14T18:28:14Z","receivedAt":"2008-02-14T18:28:14Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"\"David Symonds\" <dsymonds@gmail.com> writes:\n> On Thu, Feb 14, 2008 at 9:27 AM, Sergei Organov <osv@javad.com> wrote:\n>> Hello,\n>>\n>>  I've just cloned the public repo (it's rather small):\n>>\n>>  $ git clone http://ydirson.free.fr/soft/git/cvsps.git\n>>\n>>  and it has created cvsps/.git, but no working copy.\n>\n> That's because the remote side doesn't have a HEAD. Just run \"git\n> checkout --track -b master origin/master\" to create a local branch the\n> tracks the origin/master branch.\n\nThanks, that works:\n\n$ git checkout --track -b master origin/master\nwarning: You appear to be on a branch yet to be born.\nwarning: Forcing checkout of origin/master.\nAlready on branch \"master\"\n$\n\nCouldn't GIT be more clever and just do this for me? Besides, the fact\nthat it has created HEAD that points nowhere still seems wrong.\n\n-- Sergei.\n"}]}