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

Re: git clone / svn checkout

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 13, 2010, 17:34 UTC
Message-ID
<m362w1f7rt.fsf@localhost.localdomain>
In-Reply-To
<4CDD72D8.9010205@dewereldmorgen.be>
Bruno De Bondt <bruno@dewereldmorgen.be> writes:
> Just started using Git, coming from SVN.
> 
> Something I regularly do in SVN, is checking out part of a repository,
> instead of the complete repository.

On the other hand in SVN you have multiple projects in a single repository (under single repository hierarchy / svnroot).

Show 11 quoted lines
> Consider the following: I have a local repository for
> development. On my testing server, I only (SVN) check out part of
> this repository, eg. the document root of a website (and not all the
> project management documents, which are in the same SVN repository,
> but not needed on the testing server).
> 
> How would I do this in Git, ie. only get a specific part of a
> repository? I feel that this is very much against the whole idea of Git
> (where, as far as I understand Git now, you work with complete clones of
> repositories), but is there a way to do this? Or should I just clone
> complete repositories on my testing server as well?

In this case it would be possible, I think, to put project management documents and website itself in different git repositories, and toe them together using submodules (see git-submodule manpage, and documentation on Git Wiki and elsewhere).

There is support in git nowadays (acquired quire recently) to *checkout* only part of repository (so called "sparse checkout"), but you still need to clone whole repository.

There was some proof-of-concept work on *partial clone* support; see git mailing list archives. This is nevertheless quote hard problem to solve correctly.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Bruno De Bondt
Message 2 of 2 in “git clone / svn checkout”
  1. Bruno De BondtNov 12, 2010
  2. Jakub NarebskiNov 13, 2010

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.