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

Re: question (possibly) on git subtree/submodules

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 23, 2010, 17:18 UTC
Message-ID
<20100723171859.GG2507@burratino>
In-Reply-To
<4C49C9C6.3080409@gmail.com>
Chris Packham wrote:
Show 5 quoted lines
> The short answer is no. Nothing git has currently will let you clone a
> subset of files. Shallow clones exist if you want all the code and the
> last X changes. The reason for this is git, like other DVCSes, tracks
> _changes_ rather than _files_ this is something that took me a while to
> get my head around when I was learning git.

Not quite as cut-and-dried as it may sound, I think. Internally git compresses blobs (and other objects) by comparing them to other ones, but I do not think that is what you are talking about, and I do not see what that has to do with partial clones. In fact, the main reason I can see that partial clones (in the sense of getting all metadata but not all blobs) are not implemented is that no one has written code for it yet.

Here is a thread on related work[1]. Maybe someone else can find a more pertinent link.

> The best advice I've seen is to actually take your repository and use
> git filter-branch to create several smaller repositories

Right, and this is what “git subtree” excels at. It provides an alternative interface and implementation for “git filter-branch --subdirectory-filter”.

Hope that helps, Jonathan

[1] http://thread.gmane.org/gmane.comp.version-control.git/73117/focus=73935
Previous: Chris PackhamNext: Chris Packham
Message 3 of 9 in “question (possibly) on git subtree/submodules”
  1. Maurizio VitaleJul 23, 2010
  2. Chris PackhamJul 23, 2010
  3. Jonathan NiederJul 23, 2010
  4. Chris PackhamJul 23, 2010
  5. AlexJul 27, 2010
  6. Jakub NarebskiJul 27, 2010
  7. RFC: Sparse checkout improvements (was: Re: question (possibly) on git subtree/submodules)Marc Branchaud, Jul 27, 2010
  8. skillzero@gmail.comJul 27, 2010
  9. Marc BranchaudJul 28, 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.