* question about git and remote repositories
@ 2008-04-08 19:08 Ittay Dror
2008-04-08 20:08 ` Michele Ballabio
2008-04-08 20:24 ` Avery Pennarun
0 siblings, 2 replies; 3+ messages in thread
From: Ittay Dror @ 2008-04-08 19:08 UTC (permalink / raw)
To: git
Hi,
If I want to start working on a project that uses git (and I want to use
git also), I first need to clone the project's repo. That is very slow
(using the git:// protocol). Are there alternatives? For example, as far
as I understand, if all I want is to get the latest commit in HEAD,
branch from it and start working, then all git really needs to have is
all objects referenced from that commit (commit, trees, blobs) and
that's it, right? (as long as I don't expect to see full log of past
operations)
Thanks,
Ittay
--
Ittay Dror <ittayd@tikalk.com>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about git and remote repositories
2008-04-08 19:08 question about git and remote repositories Ittay Dror
@ 2008-04-08 20:08 ` Michele Ballabio
2008-04-08 20:24 ` Avery Pennarun
1 sibling, 0 replies; 3+ messages in thread
From: Michele Ballabio @ 2008-04-08 20:08 UTC (permalink / raw)
To: git; +Cc: Ittay Dror
On Tuesday 08 April 2008, Ittay Dror wrote:
> If I want to start working on a project that uses git (and I want to use
> git also), I first need to clone the project's repo. That is very slow
> (using the git:// protocol). Are there alternatives? For example, as far
> as I understand, if all I want is to get the latest commit in HEAD,
> branch from it and start working, then all git really needs to have is
> all objects referenced from that commit (commit, trees, blobs) and
> that's it, right? (as long as I don't expect to see full log of past
> operations)
In git terms, that is called a "shallow clone". For example:
git clone --depth 5 git://site.com/repo.git
would clone all the heads of repo.git along with their 5 most
recent commits.
You can make history deeper with
git-fetch --depth 20 git://site.com/repo.git branch
See the glossary, technical/shallow.txt, git-clone and git-fetch
man pages.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about git and remote repositories
2008-04-08 19:08 question about git and remote repositories Ittay Dror
2008-04-08 20:08 ` Michele Ballabio
@ 2008-04-08 20:24 ` Avery Pennarun
1 sibling, 0 replies; 3+ messages in thread
From: Avery Pennarun @ 2008-04-08 20:24 UTC (permalink / raw)
To: Ittay Dror; +Cc: git
On Tue, Apr 8, 2008 at 3:08 PM, Ittay Dror <ittayd@tikalk.com> wrote:
> For example, as far as
> I understand, if all I want is to get the latest commit in HEAD, branch from
> it and start working, then all git really needs to have is all objects
> referenced from that commit (commit, trees, blobs) and that's it, right? (as
> long as I don't expect to see full log of past operations)
It can be quite addictive to have the entire revision history of the
entire project sitting locally on your disk. Once you've tried it,
it's hard to go back. :)
But if you still want only the last few revisions, try using the
--depth option to git-clone.
Have fun,
Avery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-08 20:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 19:08 question about git and remote repositories Ittay Dror
2008-04-08 20:08 ` Michele Ballabio
2008-04-08 20:24 ` Avery Pennarun
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).