threads / discuss / 27843

Re: git sparse checkout repo size

Subject: Re: git sparse checkout repo size

## tl;dr

4 messages between Jul 18, 2011 and Jul 18, 2011.

replies: 3people: 2as markdown or json

gaoyong pan· Jul 18, 2011, 11:29 UTC · lore
Hi there,

I use sparse checkout to checkout out two small files(8M total) from a large repo (~2G), and then check the whole repo size is about 1.2G, it reduces about 0.8G repo size, can you tell me how to reduce it much more? I don't want to use submodule or subtree merge because I'd keep all the changing history of them in the original repo for the current or further logs.

-- 
Best Regards
Linux user #384184
@ http://counter.li.org/
Nguyen Thai Ngoc Duy· Jul 18, 2011, 11:35 UTC · re: gaoyong pan · lore
On Mon, Jul 18, 2011 at 6:29 PM, gaoyong pan <pan.gaoyong@gmail.com> wrote:
> I use sparse checkout to checkout out two small files(8M total) from a
> large repo (~2G), and then check the whole repo size is about 1.2G, it
> reduces about 0.8G repo size, can you tell me how to reduce it much
> more?

If history does not really matter to you, use shallow clone. Sparse checkout is more about worktree size, not repo size. The ideal solution would be narrow/sparse clone where you only fetch history of your two files (plus necessary trees and commits) but that won't come this year.

-- 
Duy
gaoyong pan· Jul 18, 2011, 11:54 UTC · re: Nguyen Thai Ngoc Duy · lore
2011/7/18 Nguyen Thai Ngoc Duy <pclouds@gmail.com>:
Show 7 quoted lines
> The ideal
> solution would be narrow/sparse clone where you only fetch history of
> your two files (plus necessary trees and commits) but that won't come
> this year.
> --
> Duy
>

I need to push back so sparse clone is the best solution, it must be very difficult to implement so it won't be released in this year?

-- 
Best Regards
Linux user #384184
@ http://counter.li.org/
Nguyen Thai Ngoc Duy· Jul 18, 2011, 12:25 UTC · re: gaoyong pan · lore
On Mon, Jul 18, 2011 at 6:54 PM, gaoyong pan <pan.gaoyong@gmail.com> wrote:
> I need to push back so sparse clone is the best solution, it must be
> very difficult to implement so it won't be released in this year?

Because nobody is working on it currently (I mean sparse/narrow clone. There are alternatives, you can search the archive). I had a WIP some time ago but there are still problems to be resolved before moving it forward. But I'm currently busy with pathspec work. Even if I have time for it, such a big feature may get months to be accepted. Anybody is welcome to give it a try though.

-- 
Duy

← back to recent threads