* git clone through http bug?
@ 2008-02-14 17:27 Sergei Organov
2008-02-14 17:36 ` David Symonds
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Organov @ 2008-02-14 17:27 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git clone through http bug?
2008-02-14 17:27 git clone through http bug? Sergei Organov
@ 2008-02-14 17:36 ` David Symonds
2008-02-14 18:28 ` Sergei Organov
0 siblings, 1 reply; 3+ messages in thread
From: David Symonds @ 2008-02-14 17:36 UTC (permalink / raw)
To: Sergei Organov; +Cc: git
On Thu, Feb 14, 2008 at 9:27 AM, Sergei Organov <osv@javad.com> wrote:
> 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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git clone through http bug?
2008-02-14 17:36 ` David Symonds
@ 2008-02-14 18:28 ` Sergei Organov
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Organov @ 2008-02-14 18:28 UTC (permalink / raw)
To: David Symonds; +Cc: git
"David Symonds" <dsymonds@gmail.com> writes:
> On Thu, Feb 14, 2008 at 9:27 AM, Sergei Organov <osv@javad.com> wrote:
>> 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.
>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-14 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 17:27 git clone through http bug? Sergei Organov
2008-02-14 17:36 ` David Symonds
2008-02-14 18:28 ` Sergei Organov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).