On Mon, 4 Jul 2005, Linus Torvalds wrote:
>
> I'm making something based on pack-files.
Ok, as of a few minutes ago there's now a pack-based "git clone" there. Of
course, it hasn't percolated out to the mirrors yet, so you'll not see it
for a while unless you have a master.kernel.org account like David, but
basically you can do
git clone /some/absolute/path new-dir
and it will clone the old project into new-dir using pack-files. The need
for an absolute path in the source is just because the "git clone" script
ends up "cd'ing" to the new directory before the clone, so a relative path
would need to be relative to the "new-dir" location, which is just
confusing. Oh, well.
Anyway, as mentioned, you can certainly do a local clone a lot faster with
"cp -rl" (and yes, I'll apply Junio's patch if he makes it available
against the new version, and adds a flag to make it conditional), but
using a pack-file means that the new thing not only will be totally
independent of the old one (which you may _want_ to do, especially if they
are on different filesystems), but it also means that the above works over
ssh too, ie
git clone master.kernel.org:/pub/scm/git/git.git my-git
should now do the right thing (indeed, I've even tested it - although I've
not tried it with things like multiple branches etc, which _should_ all
work automatically but.. I'm pulling Jeff's tree as I write this, but
master.kernel.org is slow, so it will be some time..).
Btw, one small note: when doing a "git clone", the newly cloned repo will
not be checked out, and "master" will be the default HEAD regardless of
what the other happened to be at (unless the other side was really screwed
up and we can't match up any "master" at all). So use "git checkout xxx"
to actually set whatever branch you want to use after a clone.
Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html