# Re: git sparse checkout repo size

4 messages from 2011-07-18 to 2011-07-18. Participants: gaoyong pan, Nguyen Thai Ngoc Duy.
Thread: https://gitlist.dev/t/27843

## gaoyong pan, 2011-07-18 11:29

Subject: Re: git sparse checkout repo size
Message-ID: <CALf5Ac2A4XTfkZraVra2sSGJZJ31bTyfmgHZWjptJNgQtXyH7Q@mail.gmail.com>
URL: https://gitlist.dev/e/CALf5Ac2A4XTfkZraVra2sSGJZJ31bTyfmgHZWjptJNgQtXyH7Q%40mail.gmail.com
In-Reply-To: <CALf5Ac223mASO+KGYa3nqB+3eajvRS4QueGT5on6G5kYqhODQQ@mail.gmail.com>

```
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, 2011-07-18 11:35

Subject: Re: git sparse checkout repo size
Message-ID: <CACsJy8C=LdcaQbc46ssc5=tTXyA-U4N4FAsqjnPyEqwYZuO4LA@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8C%3DLdcaQbc46ssc5%3DtTXyA-U4N4FAsqjnPyEqwYZuO4LA%40mail.gmail.com
In-Reply-To: <CALf5Ac2A4XTfkZraVra2sSGJZJ31bTyfmgHZWjptJNgQtXyH7Q@mail.gmail.com>

```
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, 2011-07-18 11:54

Subject: Re: git sparse checkout repo size
Message-ID: <CALf5Ac3DcoB+Psgwys6NNOmTcyGmKj5dKhR7K8ardF6MsCCDwA@mail.gmail.com>
URL: https://gitlist.dev/e/CALf5Ac3DcoB%2BPsgwys6NNOmTcyGmKj5dKhR7K8ardF6MsCCDwA%40mail.gmail.com
In-Reply-To: <CACsJy8C=LdcaQbc46ssc5=tTXyA-U4N4FAsqjnPyEqwYZuO4LA@mail.gmail.com>

```
2011/7/18 Nguyen Thai Ngoc Duy <pclouds@gmail.com>:
> 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, 2011-07-18 12:25

Subject: Re: git sparse checkout repo size
Message-ID: <CACsJy8AEcQ-Wh2KrNDQ03fnabT3OFGgVCmWkOZ6BH7=ujgsRVg@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8AEcQ-Wh2KrNDQ03fnabT3OFGgVCmWkOZ6BH7%3DujgsRVg%40mail.gmail.com
In-Reply-To: <CALf5Ac3DcoB+Psgwys6NNOmTcyGmKj5dKhR7K8ardF6MsCCDwA@mail.gmail.com>

```
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

```
