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

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
Previous: gaoyong panNext: gaoyong pan
Message 2 of 4 in “Re: git sparse checkout repo size”
  1. gaoyong panJul 18, 2011
  2. Nguyen Thai Ngoc DuyJul 18, 2011
  3. gaoyong panJul 18, 2011
  4. Nguyen Thai Ngoc DuyJul 18, 2011

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.