git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: question about git and remote repositories

From
Michele Ballabio <barra_cuda@katamail.com>
Date
Apr 8, 2008, 20:08 UTC
Message-ID
<200804082208.26220.barra_cuda@katamail.com>
In-Reply-To
<47FBC2C9.6060702@tikalk.com>
On Tuesday 08 April 2008, Ittay Dror wrote:
Show 8 quoted lines
> 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.

Previous: Ittay DrorNext: Avery Pennarun
Message 2 of 3 in “question about git and remote repositories”
  1. Ittay DrorApr 8, 2008
  2. Michele BallabioApr 8, 2008
  3. Avery PennarunApr 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.