Re: git sparse checkout repo size
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jul 18, 2011, 11:35 UTC
- Message-ID
- <CACsJy8C=LdcaQbc46ssc5=tTXyA-U4N4FAsqjnPyEqwYZuO4LA@mail.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