git clone through http bug?
Hello,
I've just cloned the public repo (it's rather small):
$ git clone http://ydirson.free.fr/soft/git/cvsps.git
and it has created cvsps/.git, but no working copy. When I examine the contents, I also notice that while the file .git/HEAD has:
ref: refs/heads/master
there is no .git/refs/heads/master file (the directory .git/refs/heads is empty).
Now, if I first clone the original repository as --bare, and then make a usual local clone from it, the local clone looks file:
$ git clone --bare http://ydirson.free.fr/soft/git/cvsps.git $ git clone cvsps.git cvsps.cloned
Is it a problem with clone over http, a problem with the repository, or it's me who does something wrong?
-- Sergei.
Quoted 7 lines · Sergei Organov
Hello,
I've just cloned the public repo (it's rather small):
$ git clone http://ydirson.free.fr/soft/git/cvsps.gitand it has created cvsps/.git, but no working copy.
That's because the remote side doesn't have a HEAD. Just run "git checkout --track -b master origin/master" to create a local branch the tracks the origin/master branch.
Dave.
Quoted 5 lines · David Symonds
Quoted 4 lines · Sergei Organov
Hello,
I've just cloned the public repo (it's rather small):
Quoted 7 lines
Quoted 3 lines
$ git clone http://ydirson.free.fr/soft/git/cvsps.gitand it has created cvsps/.git, but no working copy.
That's because the remote side doesn't have a HEAD. Just run "git checkout --track -b master origin/master" to create a local branch the tracks the origin/master branch.
Thanks, that works:
$ git checkout --track -b master origin/master warning: You appear to be on a branch yet to be born. warning: Forcing checkout of origin/master. Already on branch "master" $
Couldn't GIT be more clever and just do this for me? Besides, the fact that it has created HEAD that points nowhere still seems wrong.
-- Sergei.